diff options
author | landley <landley@driftwood> | 2006-10-30 01:38:00 -0500 |
---|---|---|
committer | landley <landley@driftwood> | 2006-10-30 01:38:00 -0500 |
commit | 09ea7ac1a269db3c9a3b76840b37a7cb1eccbc24 (patch) | |
tree | 83d36320286fee20f7a7b4cc317f9cc3802926fe /toys/toysh.c | |
parent | 2f588f7f47c43b5949e520b80cfd755a6b4ca4e6 (diff) | |
download | toybox-09ea7ac1a269db3c9a3b76840b37a7cb1eccbc24.tar.gz |
Implement df. Add -Wall to build and fix up warnings. Add copyright notices.
Add error_msg() and itoa() to library. Remove argc from globals (since argv is
null terminated), add optflags to globals.
Diffstat (limited to 'toys/toysh.c')
-rw-r--r-- | toys/toysh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/toysh.c b/toys/toysh.c index 1d792f1f..7ac430c9 100644 --- a/toys/toysh.c +++ b/toys/toysh.c @@ -181,14 +181,14 @@ static void handle(char *command) int cd_main(void) { - char *dest = toys.argc>1 ? toys.argv[1] : getenv("HOME"); + char *dest = toys.argv[1] ? toys.argv[1]: getenv("HOME"); if (chdir(dest)) error_exit("chdir %s",dest); return 0; } int exit_main(void) { - exit(toys.argc>1 ? atoi(toys.argv[1]) : 0); + exit(toys.argv[1] ? atoi(toys.argv[1]) : 0); } int toysh_main(void) |