summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-11-20 17:21:05 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-11-21 13:13:21 -0600
commite8abdfb874a1f63c8cda9335d177a6db5b2353e7 (patch)
tree72980a3ca0c3d92cdfcd3bd263e68ecbd56bd770
parentdosfs/msdos_format.c: Dead code removal (Coverity ID 1255325) (diff)
downloadrtems-e8abdfb874a1f63c8cda9335d177a6db5b2353e7.tar.bz2
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.
-rw-r--r--cpukit/libfs/src/dosfs/fat_fat_operations.c9
1 files 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 172c371e74..71fbe07772 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;
}