commit 5552db75baf06b844f874225015dc334980f35d8
parent 22f40b5a03bf9c1a73cc325922bdbe147d6de7c3
Author: sin <sin@2f30.org>
Date: Sun, 1 Feb 2015 10:22:11 +0000
Don't call var "read"
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/wc.c b/wc.c
@@ -32,12 +32,12 @@ output(const char *str, size_t nc, size_t nl, size_t nw)
void
wc(FILE *fp, const char *str)
{
- int word = 0, read;
+ int word = 0, rlen;
Rune c;
size_t nc = 0, nl = 0, nw = 0;
- while ((read = readrune(str, fp, &c))) {
- nc += (cmode == 'c') ? read :
+ while ((rlen = readrune(str, fp, &c))) {
+ nc += (cmode == 'c') ? rlen :
(c != Runeerror) ? 1 : 0;
if (c == '\n')
nl++;