aboutsummaryrefslogtreecommitdiff
path: root/toys/tty.c
diff options
context:
space:
mode:
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;
}