style fixes
last xcalloc replaced by xzalloc
This commit is contained in:
12
shell/ash.c
12
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;
|
||||
|
@@ -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);
|
||||
|
@@ -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 */
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user