From efda21ca931766eed6cfc49d1b2122c53827d9fc Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 29 Nov 2007 18:14:37 -0600 Subject: Change command main() functions to return void, and exit(toys.exitval) from the toybox infrastructure instead. Eliminates a return call from each command. --- toys/tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toys/tty.c') diff --git a/toys/tty.c b/toys/tty.c index d04e3012..3dfba9ee 100644 --- a/toys/tty.c +++ b/toys/tty.c @@ -6,12 +6,12 @@ #include "toys.h" -int tty_main(void) +void tty_main(void) { char *name = ttyname(0); if (!toys.optflags) { if (name) puts(name); else puts("Not a tty"); } - return !name; + toys.exitval = !name; } -- cgit v1.2.3