[rtems commit] dosfs/fat_fat_operations.c: Explicitly ignore return ( Coverity ID 26048)
Joel Sherril
joel at rtems.org
Fri Nov 21 19:13:32 UTC 2014
Module: rtems
Branch: master
Commit: e8abdfb874a1f63c8cda9335d177a6db5b2353e7
Changeset: http://git.rtems.org/rtems/commit/?id=e8abdfb874a1f63c8cda9335d177a6db5b2353e7
Author: Joel Sherrill <joel.sherrill at oarcorp.com>
Date: Thu Nov 20 17:21:05 2014 -0600
dosfs/fat_fat_operations.c: Explicitly ignore return (Coverity ID 26048)
Coverity spotted that the return code from fat_set_fat_cluster()
was ignored. But it should be because we want to return the status
that caused us to hit the cleanup path.
---
cpukit/libfs/src/dosfs/fat_fat_operations.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/cpukit/libfs/src/dosfs/fat_fat_operations.c b/cpukit/libfs/src/dosfs/fat_fat_operations.c
index 172c371..71fbe07 100644
--- a/cpukit/libfs/src/dosfs/fat_fat_operations.c
+++ b/cpukit/libfs/src/dosfs/fat_fat_operations.c
@@ -150,8 +150,13 @@ cleanup:
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
- /* trying to save last allocated cluster for future use */
- fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE);
+
+ /*
+ * Trying to save last allocated cluster for future use
+ *
+ * NOTE: Deliberately ignoring return value.
+ */
+ (void) fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE);
fat_buf_release(fs_info);
return rc;
}
More information about the vc
mailing list