diff toys/posix/wc.c @ 780:6cc69be43c42

Have error_msg() and friends set TT.exitval to 1 if it's still 0, clean out other places that were setting it that no longer need to.
author Rob Landley <rob@landley.net>
date Wed, 02 Jan 2013 02:00:35 -0600
parents 6617899e55f8
children 3b85d2ce34aa
line wrap: on
line diff
--- a/toys/posix/wc.c	Mon Dec 31 14:38:13 2012 -0600
+++ b/toys/posix/wc.c	Wed Jan 02 02:00:35 2013 -0600
@@ -52,10 +52,7 @@
 
   for (;;) {
     len = read(fd, toybuf, sizeof(toybuf));
-    if (len<0) {
-      perror_msg("%s",name);
-      toys.exitval = 1;
-    }
+    if (len<0) perror_msg("%s", name);
     if (len<1) break;
     for (i=0; i<len; i+=clen) {
       wchar_t wchar;