Fix unchecked return value - Patch by Christian Hesse
authorColin Leroy <colin@colino.net>
Fri, 20 Jun 2014 10:38:55 +0000 (12:38 +0200)
committerColin Leroy <colin@colino.net>
Fri, 20 Jun 2014 10:38:55 +0000 (12:38 +0200)
src/plugins/mailmbox/mailmbox.c

index 48a7a68..500d026 100644 (file)
@@ -676,7 +676,9 @@ claws_mailmbox_append_message_list_no_lock(struct claws_mailmbox_folder * folder
   r = claws_mailmbox_map(folder);
   if (r < 0) {
     debug_print("claws_mailmbox_map failed with %d\n", r);
-    ftruncate(folder->mb_fd, old_size);
+    r = ftruncate(folder->mb_fd, old_size);
+    if (r < 0)
+      debug_print("ftruncate failed with %d\n", r);
     return MAILMBOX_ERROR_FILE;
   }