Commit Diff


commit - db1f4a566ccedcd8bb86ad1136d3e52de73bedb4
commit + 8d9ddcf5a81d707cab8bc30ac42291420772f8b7
blob - 599a4ac7ffbcddc2b7b88933a6dfc0f8568e06b2
blob + 71a2ee53c3969d695180e386de218dff6a167b3e
--- FICS/utils.c
+++ FICS/utils.c
@@ -967,7 +967,8 @@ truncate_file(const char *file, int lines)
 		}
 	}
 
-	fclose(fp);
+	if (fclose(fp) != 0)
+		warn("%s: fclose() error", __func__);
 
 	if (trunc) {
 		int fd;
@@ -989,7 +990,8 @@ truncate_file(const char *file, int lines)
 				bptr = 0;
 		}
 
-		fclose(fp);
+		if (fclose(fp) != 0)
+			warn("%s: fclose() error", __func__);
 	}
 
 	return 0;