sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 5e1f7d6042c0a16dd2525db914d47bd3a474a449
parent 27fd73215b90d288141c207d0210e2c94fd5f972
Author: sin <sin@2f30.org>
Date:   Mon Apr 20 11:26:05 +0100

Simplify condition in wc(1)

Diffstat:
wc.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/wc.c b/wc.c @@ -32,8 +32,7 @@ wc(FILE *fp, const char *str) size_t nc = 0, nl = 0, nw = 0; while ((rlen = efgetrune(&c, fp, str))) { - nc += (cmode == 'c' || !cmode) ? rlen : - (c != Runeerror) ? 1 : 0; + nc += (cmode == 'c' || !cmode) ? rlen : (c != Runeerror); if (c == '\n') nl++; if (!isspacerune(c))