aboutsummaryrefslogtreecommitdiff
path: root/toys/readlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/readlink.c')
-rw-r--r--toys/readlink.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/toys/readlink.c b/toys/readlink.c
index 25dc7ba1..60a49770 100644
--- a/toys/readlink.c
+++ b/toys/readlink.c
@@ -6,15 +6,12 @@
#include "toys.h"
-int readlink_main(void)
+void readlink_main(void)
{
char *s = xreadlink(*toys.optargs);
if (s) {
xputs(s);
if (CFG_TOYBOX_FREE) free(s);
- return 0;
- }
-
- return 1;
+ } else toys.exitval = 1;
}