summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c12
-rw-r--r--shell/cmdedit.c2
-rw-r--r--shell/hush.c2
-rw-r--r--shell/lash.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/shell/ash.c b/shell/ash.c
index e8f7d30..afb9b6a 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -2402,7 +2402,7 @@ static const char * updatepwd(const char *dir)
}
p = strtok(cdcomppath, "/");
while (p) {
- switch(*p) {
+ switch (*p) {
case '.':
if (p[1] == '.' && p[2] == '\0') {
while (new > lim) {
@@ -4802,7 +4802,7 @@ exptilde(char *startp, char *p, int flag)
name = p + 1;
while ((c = *++p) != '\0') {
- switch(c) {
+ switch (c) {
case CTLESC:
return startp;
case CTLQUOTEMARK:
@@ -10211,7 +10211,7 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs)
CHECKEND(); /* set c to PEOF if at end of here document */
for (;;) { /* until end of line or end of word */
CHECKSTRSPACE(4, out); /* permit 4 calls to USTPUTC */
- switch(SIT(c, syntax)) {
+ switch (SIT(c, syntax)) {
case CNL: /* '\n' */
if (syntax == BASESYNTAX)
goto endword; /* exit outer loop */
@@ -11282,7 +11282,7 @@ shtree(union node *n, int ind, char *pfx, FILE *fp)
return;
indent(ind, pfx, fp);
- switch(n->type) {
+ switch (n->type) {
case NSEMI:
s = "; ";
goto binop;
@@ -12613,7 +12613,7 @@ readcmd(int argc, char **argv)
while ((i = nextopt("p:r")) != '\0')
#endif
{
- switch(i) {
+ switch (i) {
case 'p':
prompt = optionarg;
break;
@@ -13579,7 +13579,7 @@ static arith_t arith (const char *expr, int *perrcode)
* a number, since it evaluates to one). Think about it.
* It makes sense. */
if (lasttok != TOK_NUM) {
- switch(op) {
+ switch (op) {
case TOK_ADD:
op = TOK_UPLUS;
break;
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index bc9cc5e..7af73ec 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -1799,7 +1799,7 @@ rewrite_line:
/* After max history, remove the oldest command */
if (i >= MAX_HISTORY) {
free(history[0]);
- for(i = 0; i < MAX_HISTORY-1; i++)
+ for (i = 0; i < MAX_HISTORY-1; i++)
history[i] = history[i+1];
}
history[i++] = xstrdup(command);
diff --git a/shell/hush.c b/shell/hush.c
index a6e029e..9bc0013 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2269,7 +2269,7 @@ static int parse_group(o_string *dest, struct p_context *ctx,
return 1; /* syntax error, groups and arglists don't mix */
}
initialize_context(&sub);
- switch(ch) {
+ switch (ch) {
case '(': endch=')'; child->subshell=1; break;
case '{': endch='}'; break;
default: syntax(); /* really logic error */
diff --git a/shell/lash.c b/shell/lash.c
index 5257671..52b1174 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -789,7 +789,7 @@ static int expand_arguments(char *command)
src = command;
while((dst = strchr(src,'$')) != NULL){
var = NULL;
- switch(*(dst+1)) {
+ switch (*(dst+1)) {
case '?':
var = itoa(last_return_code);
break;
@@ -1163,7 +1163,7 @@ static int pseudo_exec(struct child_prog *child)
char **argv_l = child->argv;
int argc_l;
- for(argc_l=0; *argv_l; argv_l++, argc_l++);
+ for (argc_l=0; *argv_l; argv_l++, argc_l++);
optind = 1;
run_applet_by_name(child->argv[0], argc_l, child->argv);
}