X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fspool_mbox.c;h=16b0a332cc73bdd4c1c95bfb477199cfbce34f21;hb=9c29c48f8327fc20b3840ce2fb4dad4a6c8003b2;hp=8ca468a856253bc8b5d1cbaacd5ef4da5745292a;hpb=328c5688dbe0f4c14418f22350ccd99b3fe8ac71;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/spool_mbox.c b/src/src/spool_mbox.c index 8ca468a85..16b0a332c 100644 --- a/src/src/spool_mbox.c +++ b/src/src/spool_mbox.c @@ -4,7 +4,7 @@ /* Copyright (c) Tom Kistner 2003 - 2015 * License: GPL - * Copyright (c) The Exim Maintainers 2016 + * Copyright (c) The Exim Maintainers 2017 */ /* Code for setting up a MBOX style spool file inside a /scan/ @@ -148,7 +148,7 @@ if (!spool_mbox_ok) if (!spool_file_wireformat || source_file_override) j = fread(buffer, 1, sizeof(buffer), data_file); else /* needs CRLF -> NL */ - if ((s = fgets(buffer, sizeof(buffer), data_file))) + if ((s = US fgets(CS buffer, sizeof(buffer), data_file))) { uschar * p = s + Ustrlen(s) - 1; @@ -216,8 +216,7 @@ if (spool_mbox_ok && !no_mbox_unspool) mbox_path = string_sprintf("%s/scan/%s", spool_directory, spooled_message_id); - tempdir = opendir(CS mbox_path); - if (!tempdir) + if (!(tempdir = opendir(CS mbox_path))) { debug_printf("Unable to opendir(%s): %s\n", mbox_path, strerror(errno)); /* Just in case we still can: */ @@ -225,7 +224,7 @@ if (spool_mbox_ok && !no_mbox_unspool) return; } /* loop thru dir & delete entries */ - while((entry = readdir(tempdir)) != NULL) + while((entry = readdir(tempdir))) { uschar *name = US entry->d_name; int dummy; @@ -233,7 +232,7 @@ if (spool_mbox_ok && !no_mbox_unspool) file_path = string_sprintf("%s/%s", mbox_path, name); debug_printf("unspool_mbox(): unlinking '%s'\n", file_path); - dummy = unlink(CS file_path); + dummy = unlink(CS file_path); dummy = dummy; /* compiler quietening */ } closedir(tempdir);