From 55970d0c2c0c78ebe386cf000129435476057817 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 1 Dec 2012 11:03:52 -0600 Subject: Minor cleanup: unify two codepaths that do the same thing. --- toys/posix/wc.c | 6 ++---- 1 file 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; -- cgit v1.2.3