diff options
author | David Crosby <dave@dafyddcrosby.com> | 2015-07-26 03:12:06 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2015-08-11 12:59:27 +0000 |
commit | fc5b50353ec97ddd51c159b0d415c69e4a0e02f8 (patch) | |
tree | 063be8d920df7dacb2e1d2e7d9f045ab34f13e1a | |
parent | Check dup call for errors (diff) | |
download | w3m-fc5b50353ec97ddd51c159b0d415c69e4a0e02f8.tar.gz w3m-fc5b50353ec97ddd51c159b0d415c69e4a0e02f8.zip |
Adjust while loop
Diffstat (limited to '')
-rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,6 +1,7 @@ /* $Id: main.c,v 1.270 2010/08/24 10:11:51 htrb Exp $ */ #define MAINPROGRAM #include "fm.h" +#include <stdio.h> #include <signal.h> #include <setjmp.h> #include <sys/stat.h> @@ -1272,7 +1273,7 @@ dump_source(Buffer *buf) f = fopen(buf->sourcefile, "r"); if (f == NULL) return; - while (c = fgetc(f), !feof(f)) { + while ((c = fgetc(f)) != EOF) { putchar(c); } fclose(f); |