diff options
| author | Paul Eggert | 2011-01-22 23:32:08 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-01-22 23:32:08 -0800 |
| commit | 200034fcff6b5bd3274bf2e986133e0a7ae97a8d (patch) | |
| tree | 9fa3b1f4d5dac6e1ee7beb7b1d963b412820eb3b /lib-src/hexl.c | |
| parent | 5c7d01a54e356f905e16bdb24f9a8bfc1d676d0e (diff) | |
| parent | 9055082ef8a2f1b9033f77f0eb2b9c756a306c01 (diff) | |
| download | emacs-200034fcff6b5bd3274bf2e986133e0a7ae97a8d.tar.gz emacs-200034fcff6b5bd3274bf2e986133e0a7ae97a8d.zip | |
Merge: Check return values of some library calls.
Diffstat (limited to 'lib-src/hexl.c')
| -rw-r--r-- | lib-src/hexl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib-src/hexl.c b/lib-src/hexl.c index aa5b370aade..e0a5166760a 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c | |||
| @@ -179,7 +179,9 @@ main (int argc, char **argv) | |||
| 179 | 179 | ||
| 180 | #define hexchar(x) (isdigit (x) ? x - '0' : x - 'a' + 10) | 180 | #define hexchar(x) (isdigit (x) ? x - '0' : x - 'a' + 10) |
| 181 | 181 | ||
| 182 | fread (buf, 1, 10, fp); /* skip 10 bytes */ | 182 | /* Skip 10 bytes. */ |
| 183 | if (fread (buf, 1, 10, fp) != 10) | ||
| 184 | break; | ||
| 183 | 185 | ||
| 184 | for (i=0; i < 16; ++i) | 186 | for (i=0; i < 16; ++i) |
| 185 | { | 187 | { |
| @@ -207,7 +209,9 @@ main (int argc, char **argv) | |||
| 207 | if (i < 16) | 209 | if (i < 16) |
| 208 | break; | 210 | break; |
| 209 | 211 | ||
| 210 | fread (buf, 1, 18, fp); /* skip 18 bytes */ | 212 | /* Skip 18 bytes. */ |
| 213 | if (fread (buf, 1, 18, fp) != 18) | ||
| 214 | break; | ||
| 211 | } | 215 | } |
| 212 | } | 216 | } |
| 213 | } | 217 | } |