X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=mymail.git;a=blobdiff_plain;f=mymail.c;h=347f2a4be148611e356bf5993f4b0743a77ddc0d;hp=c1b09be84869c7fe58f395aceb4bd753e6da6241;hb=cc6ebaf22de26379f347bccad740d4d2d28f780e;hpb=4763d787a56d135762334c30fcedfb425d5e5bce diff --git a/mymail.c b/mymail.c index c1b09be..347f2a4 100644 --- a/mymail.c +++ b/mymail.c @@ -200,7 +200,7 @@ void *safe_malloc(size_t n) { void *p = malloc(n); if(!p && n != 0) { fprintf(stderr, - "selector: cannot allocate memory: %s\n", strerror(errno)); + "mymail: cannot allocate memory: %s\n", strerror(errno)); exit(EXIT_FAILURE); } return p; @@ -212,8 +212,9 @@ FILE *safe_fopen(const char *path, const char *mode, const char *comment) { return result; } else { fprintf(stderr, - "mymail: Cannot open file '%s' (%s) with mode \"%s\".\n", - path, comment, mode); + "mymail: Cannot open file '%s' (%s) with mode \"%s\": %s\n", + path, comment, mode, + strerror(errno)); exit(EXIT_FAILURE); } }