summaryrefslogtreecommitdiffstats
path: root/text-utils/colrm.c
diff options
context:
space:
mode:
Diffstat (limited to 'text-utils/colrm.c')
-rw-r--r--text-utils/colrm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/text-utils/colrm.c b/text-utils/colrm.c
index 9ef8af679..5e18a6ffa 100644
--- a/text-utils/colrm.c
+++ b/text-utils/colrm.c
@@ -70,7 +70,7 @@ start:
ct = 0;
loop1:
c = getwc(stdin);
- if (feof(stdin))
+ if (c == WEOF)
goto fin;
if (c == '\t')
w = ((ct + 8) & ~7) - ct;
@@ -96,7 +96,7 @@ loop1:
/* Loop getting rid of characters */
while (!last || ct < last) {
c = getwc(stdin);
- if (feof(stdin))
+ if (c == WEOF)
goto fin;
if (c == '\n') {
putwc(c, stdout);
@@ -119,7 +119,7 @@ loop1:
/* Output last of the line */
for (;;) {
c = getwc(stdin);
- if (feof(stdin))
+ if (c == WEOF)
break;
if (c == '\n') {
putwc(c, stdout);