Mercurial > hg > toybox
diff toys/readlink.c @ 186:25447caf1b4b
Change command main() functions to return void, and exit(toys.exitval) from
the toybox infrastructure instead. Eliminates a return call from each command.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 29 Nov 2007 18:14:37 -0600 |
parents | 0dfead29c893 |
children | 30a6db5a95c2 |
line wrap: on
line diff
--- a/toys/readlink.c Thu Nov 29 17:49:50 2007 -0600 +++ b/toys/readlink.c Thu Nov 29 18:14:37 2007 -0600 @@ -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; }