diff options
author | Rob Landley <rob@landley.net> | 2012-12-01 11:03:52 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2012-12-01 11:03:52 -0600 |
commit | 55970d0c2c0c78ebe386cf000129435476057817 (patch) | |
tree | 42e7f106b41f6044f82debc3f724d2c5ccc0873f /toys/posix | |
parent | ed7abaf0968a850e262a2ae8f5a8e0b41aaa5879 (diff) | |
download | toybox-55970d0c2c0c78ebe386cf000129435476057817.tar.gz |
Minor cleanup: unify two codepaths that do the same thing.
Diffstat (limited to 'toys/posix')
-rw-r--r-- | toys/posix/wc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/toys/posix/wc.c b/toys/posix/wc.c index a9c588e8..56c9673a 100644 --- a/toys/posix/wc.c +++ b/toys/posix/wc.c @@ -63,10 +63,8 @@ static void do_wc(int fd, char *name) if (CFG_TOYBOX_I18N && (toys.optflags&FLAG_m)) { clen = mbrtowc(&wchar, toybuf+i, len-i, 0); if (clen == -1) { - if (i != len-1) { - clen = 1; - continue; - } else break; + clen = 1; + continue; } if (clen == -2) break; if (clen == 0) clen=1; |