aboutsummaryrefslogtreecommitdiff
path: root/toys/tty.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/tty.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/tty.c')
-rw-r--r--toys/tty.c4
1 files changed, 2 insertions, 2 deletions
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;
}