* libparted/fs/hfs/hfs.c (hfs_extract_file, hfs_extract_bitmap):
(hfs_extract_mdb, hfsplus_extract_file, hfsplus_extract_vh):
Fail when fclose fails for a written-to file handle.
goto err_close;
}
- fclose(fout);
- return 1;
+ return (fclose(fout) == 0 ? 1 : 0);
+
err_close:
fclose(fout);
return 0;
goto err_close;
}
- fclose(fout);
- return 1;
+ return (fclose(fout) == 0 ? 1 : 0);
+
err_close:
fclose(fout);
return 0;
if (!fwrite(extract_buffer, PED_SECTOR_SIZE_DEFAULT, 1, fout))
goto err_close;
- fclose(fout);
- return 1;
+ return (fclose(fout) == 0 ? 1 : 0);
+
err_close:
fclose(fout);
return 0;
goto err_close;
}
- fclose(fout);
- return 1;
+ return (fclose(fout) == 0 ? 1 : 0);
+
err_close:
fclose(fout);
return 0;
if (!fwrite(extract_buffer, PED_SECTOR_SIZE_DEFAULT, 1, fout))
goto err_close;
- fclose(fout);
- return 1;
+ return (fclose(fout) == 0 ? 1 : 0);
+
err_close:
fclose(fout);
return 0;