Don't ignore the return code of fwrite(). (Slight modification of a

patch from Phil Bordelon.)

[originally from svn r8373]
This commit is contained in:
Simon Tatham
2008-12-12 19:49:05 +00:00
parent ba08d8ab28
commit 17334d1945

View File

@ -114,7 +114,11 @@ int main(int argc, char **argv)
obfuscate_bitmap(data, datalen * 8, decode); obfuscate_bitmap(data, datalen * 8, decode);
if (outputmode == BINARY) { if (outputmode == BINARY) {
fwrite(data, 1, datalen, stdout); int ret = fwrite(data, 1, datalen, stdout);
if (ret < 0) {
fprintf(stderr, "obfusc: write: %s\n", strerror(errno));
return 1;
}
} else { } else {
int i; int i;
for (i = 0; i < datalen; i++) for (i = 0; i < datalen; i++)