]> git.pond.sub.org Git - empserver/commitdiff
(turn): Check whether fclose() succeeds.
authorMarc Olzheim <marcolz@stack.nl>
Fri, 25 Mar 2005 23:59:48 +0000 (23:59 +0000)
committerMarc Olzheim <marcolz@stack.nl>
Fri, 25 Mar 2005 23:59:48 +0000 (23:59 +0000)
src/lib/commands/turn.c

index 4f35f30e3446da3741a2798350623309e320d44f..6a365effb45f727d7ca0880a824e98cb3cfb1147 100644 (file)
@@ -113,7 +113,13 @@ turn(void)
            msgfilepath);
        return RET_SYS;
     }
-    fclose(fptr);
+    if (fclose(fptr)) {
+       pr("Something went wrong closing the message.\n");
+       logerror("Could not properly close message file (%s).\n",
+           msgfilepath);
+       return RET_SYS;
+    }
+
     pr("\n");
 
     return RET_OK;