aboutsummaryrefslogtreecommitdiff
path: root/toys/catv.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-11-29 18:14:37 -0600
committerRob Landley <rob@landley.net>2007-11-29 18:14:37 -0600
commitefda21ca931766eed6cfc49d1b2122c53827d9fc (patch)
tree16453d708a1b0fc6b325ada99bbe72cbaab7148b /toys/catv.c
parent7634b55f27ad483ec634ba9defac93872e3a329f (diff)
downloadtoybox-efda21ca931766eed6cfc49d1b2122c53827d9fc.tar.gz
Change command main() functions to return void, and exit(toys.exitval) from
the toybox infrastructure instead. Eliminates a return call from each command.
Diffstat (limited to 'toys/catv.c')
-rw-r--r--toys/catv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/toys/catv.c b/toys/catv.c
index 74242010..e5412700 100644
--- a/toys/catv.c
+++ b/toys/catv.c
@@ -34,21 +34,19 @@ void do_catv(int fd, char *name)
}
if (c < 32) {
if (c == 10) {
- if (toys.optflags & 1) putchar('$');
+ if (toys.optflags & 1) xputc('$');
} else if (toys.optflags & (c==9 ? 2 : 4)) {
printf("^%c", c+'@');
continue;
}
}
- putchar(c);
+ xputc(c);
}
}
}
-int catv_main(void)
+void catv_main(void)
{
toys.optflags^=4;
loopfiles(toys.optargs, do_catv);
-
- return toys.exitval;
}