tidying: coverity issues
[exim.git] / src / src / spool_out.c
index e7a6a65352ac6e9149237ba1b219d8fd87cfd1b5..62909915ffe4d68f5db5df18ad93fdd8c6988015 100644 (file)
@@ -247,7 +247,7 @@ if (tls_in.ourcert)
 if (tls_in.ocsp)        fprintf(f, "-tls_ocsp %d\n",   tls_in.ocsp);
 #endif
 
-#ifdef EXPERIMENTAL_INTERNATIONAL
+#ifdef SUPPORT_I18N
 if (message_smtputf8)
   {
   fprintf(f, "-smtputf8\n");
@@ -329,7 +329,8 @@ if (EXIMfsync(fileno(f)) < 0)
 
 /* Get the size of the file, and close it. */
 
-fstat(fd, &statbuf);
+if (fstat(fd, &statbuf) != 0)
+  return spool_write_error(where, errmsg, US"fstat", temp_name, NULL);
 if (fclose(f) != 0)
   return spool_write_error(where, errmsg, US"close", temp_name, NULL);