aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Crosby <dave@dafyddcrosby.com>2015-07-26 03:12:06 +0000
committerTatsuya Kinoshita <tats@debian.org>2015-08-11 12:59:27 +0000
commitfc5b50353ec97ddd51c159b0d415c69e4a0e02f8 (patch)
tree063be8d920df7dacb2e1d2e7d9f045ab34f13e1a
parentCheck dup call for errors (diff)
downloadw3m-fc5b50353ec97ddd51c159b0d415c69e4a0e02f8.tar.gz
w3m-fc5b50353ec97ddd51c159b0d415c69e4a0e02f8.zip
Adjust while loop
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index f4399ac..6609b49 100644
--- a/main.c
+++ b/main.c
@@ -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);