/* Copyright (c) Tom Kistner <tom@duncanthrax.net> 2003 - 2015
* License: GPL
- * Copyright (c) The Exim Maintainers 2016 - 2018
+ * Copyright (c) The Exim Maintainers 2016 - 2020
*/
/* Code for setting up a MBOX style spool file inside a /scan/<msgid>
temp_string = string_sprintf("scan/%s", message_id);
if (!directory_make(spool_directory, temp_string, 0750, FALSE))
{
- log_write(0, LOG_MAIN|LOG_PANIC, "%s", string_open_failed(errno,
- "scan directory %s/scan/%s", spool_directory, temp_string));
+ log_write(0, LOG_MAIN|LOG_PANIC, "%s",
+ string_open_failed("scan directory %s/scan/%s", spool_directory, temp_string));
goto OUT;
}
if (!(mbox_file = modefopen(mbox_path, "wb", SPOOL_MODE)))
{
- log_write(0, LOG_MAIN|LOG_PANIC, "%s", string_open_failed(errno,
- "scan file %s", mbox_path));
+ log_write(0, LOG_MAIN|LOG_PANIC, "%s",
+ string_open_failed("scan file %s", mbox_path));
goto OUT;
}
if ( !(yield = Ufopen(mbox_path,"rb"))
|| fstat(fileno(yield), &statbuf) != 0
)
- log_write(0, LOG_MAIN|LOG_PANIC, "%s", string_open_failed(errno,
- "scan file %s", mbox_path));
+ log_write(0, LOG_MAIN|LOG_PANIC, "%s",
+ string_open_failed( "scan file %s", mbox_path));
else
*mbox_file_size = statbuf.st_size;
for (struct dirent *entry; entry = readdir(tempdir); )
{
uschar *name = US entry->d_name;
- int dummy;
if (Ustrcmp(name, US".") == 0 || Ustrcmp(name, US"..") == 0) continue;
file_path = string_sprintf("%s/%s", mbox_path, name);
debug_printf("unspool_mbox(): unlinking '%s'\n", file_path);
- dummy = unlink(CS file_path); dummy = dummy; /* compiler quietening */
+ (void) unlink(CS file_path);
}
closedir(tempdir);