diff options
| author | Alexey Zelkin <phantom@FreeBSD.org> | 1999-12-28 12:55:58 +0000 |
|---|---|---|
| committer | Alexey Zelkin <phantom@FreeBSD.org> | 1999-12-28 12:55:58 +0000 |
| commit | c7986155e04855e7a51dabb3d2a869dfcacab05b (patch) | |
| tree | aaf9eff697d6d6b226b1cecfefbda02ab4699b9d /gnu/usr.bin/man | |
| parent | 317b1ddf876c7274965ef74f63fb6ed6438f32ec (diff) | |
Notes
Diffstat (limited to 'gnu/usr.bin/man')
| -rw-r--r-- | gnu/usr.bin/man/man/man.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gnu/usr.bin/man/man/man.c b/gnu/usr.bin/man/man/man.c index 812013418f98..cd6299053dcf 100644 --- a/gnu/usr.bin/man/man/man.c +++ b/gnu/usr.bin/man/man/man.c @@ -1254,10 +1254,12 @@ make_cat_file (path, man_file, cat_file, manid) } #endif - while ((s = getc(pp)) != EOF) - putc(s, fp); + f = 0; + while ((s = getc(pp)) != EOF) { + putc(s, fp); f++; + } - if ((s = pclose(pp)) == -1) { + if (!f || ((s = pclose(pp)) == -1)) { s = errno; fprintf(stderr, "Failed.\n"); errno = s; |
