summaryrefslogtreecommitdiffstats
path: root/bin/ed/io.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-12-16 21:12:23 +0000
committerdim <dim@FreeBSD.org>2011-12-16 21:12:23 +0000
commit4e36a16dc88daa10cbae50f682eb574300d62380 (patch)
tree3ef8493c80aac7980af8dc53abd0bf16e9436e3d /bin/ed/io.c
parentc54854914ac3e4a9ea43d7d0311069e7e352386a (diff)
downloadFreeBSD-src-4e36a16dc88daa10cbae50f682eb574300d62380.zip
FreeBSD-src-4e36a16dc88daa10cbae50f682eb574300d62380.tar.gz
Fix some obtuse fprintf tricks in bin/ed.
MFC after: 1 week
Diffstat (limited to 'bin/ed/io.c')
-rw-r--r--bin/ed/io.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/ed/io.c b/bin/ed/io.c
index 85ba0de..63fe10c 100644
--- a/bin/ed/io.c
+++ b/bin/ed/io.c
@@ -53,7 +53,8 @@ read_file(char *fn, long n)
errmsg = "cannot close input file";
return ERR;
}
- fprintf(stdout, !scripted ? "%lu\n" : "", size);
+ if (!scripted)
+ fprintf(stdout, "%lu\n", size);
return current_addr - n;
}
@@ -161,7 +162,8 @@ write_file(char *fn, const char *mode, long n, long m)
errmsg = "cannot close output file";
return ERR;
}
- fprintf(stdout, !scripted ? "%lu\n" : "", size);
+ if (!scripted)
+ fprintf(stdout, "%lu\n", size);
return n ? m - n + 1 : 0;
}
OpenPOWER on IntegriCloud