mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
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:
6
obfusc.c
6
obfusc.c
@ -114,7 +114,11 @@ int main(int argc, char **argv)
|
||||
obfuscate_bitmap(data, datalen * 8, decode);
|
||||
|
||||
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 {
|
||||
int i;
|
||||
for (i = 0; i < datalen; i++)
|
||||
|
Reference in New Issue
Block a user