chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba08d8a
)
Don't ignore the return code of fwrite(). (Slight modification of a
author
Simon Tatham
<anakin@pobox.com>
Fri, 12 Dec 2008 19:49:05 +0000
(19:49 +0000)
committer
Simon Tatham
<anakin@pobox.com>
Fri, 12 Dec 2008 19:49:05 +0000
(19:49 +0000)
patch from Phil Bordelon.)
[originally from svn r8373]
obfusc.c
patch
|
blob
|
history
diff --git
a/obfusc.c
b/obfusc.c
index 0db8aee867f89ee4726faf2c32a9f7d088c39e0c..dc0656c20e4fc4ab19d2b8bb826af0306b0a894d 100644
(file)
--- a/
obfusc.c
+++ b/
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++)