diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-12-26 10:42:51 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-12-26 10:42:51 +0000 |
commit | 52f326a239527e7242321661d2ba06b50daa3c43 (patch) | |
tree | af74820b70fa27929fe218c95822c20651b60637 /shell | |
parent | da5e86c349488f3ea31718b149ce9f0d1493b64b (diff) | |
download | busybox-w32-52f326a239527e7242321661d2ba06b50daa3c43.tar.gz busybox-w32-52f326a239527e7242321661d2ba06b50daa3c43.tar.bz2 busybox-w32-52f326a239527e7242321661d2ba06b50daa3c43.zip |
style fixes
last xcalloc replaced by xzalloc
git-svn-id: svn://busybox.net/trunk/busybox@17081 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 12 | ||||
-rw-r--r-- | shell/cmdedit.c | 2 | ||||
-rw-r--r-- | shell/hush.c | 2 | ||||
-rw-r--r-- | shell/lash.c | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/shell/ash.c b/shell/ash.c index e8f7d30bd..afb9b6a95 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -2402,7 +2402,7 @@ static const char * updatepwd(const char *dir) | |||
2402 | } | 2402 | } |
2403 | p = strtok(cdcomppath, "/"); | 2403 | p = strtok(cdcomppath, "/"); |
2404 | while (p) { | 2404 | while (p) { |
2405 | switch(*p) { | 2405 | switch (*p) { |
2406 | case '.': | 2406 | case '.': |
2407 | if (p[1] == '.' && p[2] == '\0') { | 2407 | if (p[1] == '.' && p[2] == '\0') { |
2408 | while (new > lim) { | 2408 | while (new > lim) { |
@@ -4802,7 +4802,7 @@ exptilde(char *startp, char *p, int flag) | |||
4802 | name = p + 1; | 4802 | name = p + 1; |
4803 | 4803 | ||
4804 | while ((c = *++p) != '\0') { | 4804 | while ((c = *++p) != '\0') { |
4805 | switch(c) { | 4805 | switch (c) { |
4806 | case CTLESC: | 4806 | case CTLESC: |
4807 | return startp; | 4807 | return startp; |
4808 | case CTLQUOTEMARK: | 4808 | case CTLQUOTEMARK: |
@@ -10211,7 +10211,7 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs) | |||
10211 | CHECKEND(); /* set c to PEOF if at end of here document */ | 10211 | CHECKEND(); /* set c to PEOF if at end of here document */ |
10212 | for (;;) { /* until end of line or end of word */ | 10212 | for (;;) { /* until end of line or end of word */ |
10213 | CHECKSTRSPACE(4, out); /* permit 4 calls to USTPUTC */ | 10213 | CHECKSTRSPACE(4, out); /* permit 4 calls to USTPUTC */ |
10214 | switch(SIT(c, syntax)) { | 10214 | switch (SIT(c, syntax)) { |
10215 | case CNL: /* '\n' */ | 10215 | case CNL: /* '\n' */ |
10216 | if (syntax == BASESYNTAX) | 10216 | if (syntax == BASESYNTAX) |
10217 | goto endword; /* exit outer loop */ | 10217 | goto endword; /* exit outer loop */ |
@@ -11282,7 +11282,7 @@ shtree(union node *n, int ind, char *pfx, FILE *fp) | |||
11282 | return; | 11282 | return; |
11283 | 11283 | ||
11284 | indent(ind, pfx, fp); | 11284 | indent(ind, pfx, fp); |
11285 | switch(n->type) { | 11285 | switch (n->type) { |
11286 | case NSEMI: | 11286 | case NSEMI: |
11287 | s = "; "; | 11287 | s = "; "; |
11288 | goto binop; | 11288 | goto binop; |
@@ -12613,7 +12613,7 @@ readcmd(int argc, char **argv) | |||
12613 | while ((i = nextopt("p:r")) != '\0') | 12613 | while ((i = nextopt("p:r")) != '\0') |
12614 | #endif | 12614 | #endif |
12615 | { | 12615 | { |
12616 | switch(i) { | 12616 | switch (i) { |
12617 | case 'p': | 12617 | case 'p': |
12618 | prompt = optionarg; | 12618 | prompt = optionarg; |
12619 | break; | 12619 | break; |
@@ -13579,7 +13579,7 @@ static arith_t arith (const char *expr, int *perrcode) | |||
13579 | * a number, since it evaluates to one). Think about it. | 13579 | * a number, since it evaluates to one). Think about it. |
13580 | * It makes sense. */ | 13580 | * It makes sense. */ |
13581 | if (lasttok != TOK_NUM) { | 13581 | if (lasttok != TOK_NUM) { |
13582 | switch(op) { | 13582 | switch (op) { |
13583 | case TOK_ADD: | 13583 | case TOK_ADD: |
13584 | op = TOK_UPLUS; | 13584 | op = TOK_UPLUS; |
13585 | break; | 13585 | break; |
diff --git a/shell/cmdedit.c b/shell/cmdedit.c index bc9cc5ef4..7af73ec6e 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c | |||
@@ -1799,7 +1799,7 @@ rewrite_line: | |||
1799 | /* After max history, remove the oldest command */ | 1799 | /* After max history, remove the oldest command */ |
1800 | if (i >= MAX_HISTORY) { | 1800 | if (i >= MAX_HISTORY) { |
1801 | free(history[0]); | 1801 | free(history[0]); |
1802 | for(i = 0; i < MAX_HISTORY-1; i++) | 1802 | for (i = 0; i < MAX_HISTORY-1; i++) |
1803 | history[i] = history[i+1]; | 1803 | history[i] = history[i+1]; |
1804 | } | 1804 | } |
1805 | history[i++] = xstrdup(command); | 1805 | history[i++] = xstrdup(command); |
diff --git a/shell/hush.c b/shell/hush.c index a6e029e4e..9bc0013d7 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2269,7 +2269,7 @@ static int parse_group(o_string *dest, struct p_context *ctx, | |||
2269 | return 1; /* syntax error, groups and arglists don't mix */ | 2269 | return 1; /* syntax error, groups and arglists don't mix */ |
2270 | } | 2270 | } |
2271 | initialize_context(&sub); | 2271 | initialize_context(&sub); |
2272 | switch(ch) { | 2272 | switch (ch) { |
2273 | case '(': endch=')'; child->subshell=1; break; | 2273 | case '(': endch=')'; child->subshell=1; break; |
2274 | case '{': endch='}'; break; | 2274 | case '{': endch='}'; break; |
2275 | default: syntax(); /* really logic error */ | 2275 | default: syntax(); /* really logic error */ |
diff --git a/shell/lash.c b/shell/lash.c index 525767190..52b117431 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -789,7 +789,7 @@ static int expand_arguments(char *command) | |||
789 | src = command; | 789 | src = command; |
790 | while((dst = strchr(src,'$')) != NULL){ | 790 | while((dst = strchr(src,'$')) != NULL){ |
791 | var = NULL; | 791 | var = NULL; |
792 | switch(*(dst+1)) { | 792 | switch (*(dst+1)) { |
793 | case '?': | 793 | case '?': |
794 | var = itoa(last_return_code); | 794 | var = itoa(last_return_code); |
795 | break; | 795 | break; |
@@ -1163,7 +1163,7 @@ static int pseudo_exec(struct child_prog *child) | |||
1163 | char **argv_l = child->argv; | 1163 | char **argv_l = child->argv; |
1164 | int argc_l; | 1164 | int argc_l; |
1165 | 1165 | ||
1166 | for(argc_l=0; *argv_l; argv_l++, argc_l++); | 1166 | for (argc_l=0; *argv_l; argv_l++, argc_l++); |
1167 | optind = 1; | 1167 | optind = 1; |
1168 | run_applet_by_name(child->argv[0], argc_l, child->argv); | 1168 | run_applet_by_name(child->argv[0], argc_l, child->argv); |
1169 | } | 1169 | } |