diff options
author | Denis Vlasenko | 2007-04-12 00:32:05 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-04-12 00:32:05 +0000 |
commit | 51742f4bb0c57a4d5063ece9437a2f34a42e52c8 (patch) | |
tree | 7a912fc65ff43bdb09078d75bfc02ad8f5380b47 /shell/bbsh.c | |
parent | 50f7f446ecaadef6895a4ee601567e0b68330637 (diff) | |
download | busybox-51742f4bb0c57a4d5063ece9437a2f34a42e52c8.zip busybox-51742f4bb0c57a4d5063ece9437a2f34a42e52c8.tar.gz |
style fixes. No code changes
Diffstat (limited to 'shell/bbsh.c')
-rw-r--r-- | shell/bbsh.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/shell/bbsh.c b/shell/bbsh.c index 6bef368..8f0fb05 100644 --- a/shell/bbsh.c +++ b/shell/bbsh.c @@ -68,7 +68,7 @@ struct pipeline { static void free_list(void *list, void (*freeit)(void *data)) { - while(list) { + while (list) { void **next = (void **)list; void *list_next = *next; freeit(list); @@ -159,12 +159,12 @@ static int run_pipeline(struct pipeline *line) // Handle local commands. This is totally fake and plastic. if (cmd->argc==2 && !strcmp(cmd->argv[0],"cd")) chdir(cmd->argv[1]); - else if(!strcmp(cmd->argv[0],"exit")) + else if (!strcmp(cmd->argv[0],"exit")) exit(cmd->argc>1 ? atoi(cmd->argv[1]) : 0); else { int status; pid_t pid=fork(); - if(!pid) { + if (!pid) { run_applet_and_exit(cmd->argv[0],cmd->argc,cmd->argv); execvp(cmd->argv[0],cmd->argv); printf("No %s",cmd->argv[0]); @@ -179,7 +179,7 @@ static void free_cmd(void *data) { struct command *cmd=(struct command *)data; - while(cmd->argc) free(cmd->argv[--cmd->argc]); + while (cmd->argc) free(cmd->argv[--cmd->argc]); } @@ -211,8 +211,8 @@ int bbsh_main(int argc, char **argv) else { unsigned cmdlen=0; for (;;) { - if(!f) putchar('$'); - if(1 > getline(&command, &cmdlen,f ? : stdin)) break; + if (!f) putchar('$'); + if (1 > getline(&command, &cmdlen,f ? : stdin)) break; handle(command); } |