Don't call var "read"
This commit is contained in:
parent
22f40b5a03
commit
5552db75ba
6
wc.c
6
wc.c
|
@ -32,12 +32,12 @@ output(const char *str, size_t nc, size_t nl, size_t nw)
|
||||||
void
|
void
|
||||||
wc(FILE *fp, const char *str)
|
wc(FILE *fp, const char *str)
|
||||||
{
|
{
|
||||||
int word = 0, read;
|
int word = 0, rlen;
|
||||||
Rune c;
|
Rune c;
|
||||||
size_t nc = 0, nl = 0, nw = 0;
|
size_t nc = 0, nl = 0, nw = 0;
|
||||||
|
|
||||||
while ((read = readrune(str, fp, &c))) {
|
while ((rlen = readrune(str, fp, &c))) {
|
||||||
nc += (cmode == 'c') ? read :
|
nc += (cmode == 'c') ? rlen :
|
||||||
(c != Runeerror) ? 1 : 0;
|
(c != Runeerror) ? 1 : 0;
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
nl++;
|
nl++;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user