diff options
-rw-r--r-- | bin/sh/expand.c | 6 | ||||
-rw-r--r-- | bin/sh/miscbltin.c | 8 | ||||
-rw-r--r-- | bin/sh/trap.c | 2 |
3 files changed, 4 insertions, 12 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c index f087f54..e980589 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -893,7 +893,7 @@ numvar: } /* FALLTHROUGH */ case '*': - if (ifsset() != 0) + if (ifsset()) sep = ifsval()[0]; else sep = ' '; @@ -1022,8 +1022,7 @@ ifsbreakup(char *string, struct arglist *arglist) p++; } } while ((ifsp = ifsp->next) != NULL); - if (*start || (!ifsspc && start > string && - (nulonly || 1))) { + if (*start || (!ifsspc && start > string)) { sp = (struct strlist *)stalloc(sizeof *sp); sp->text = start; *arglist->lastp = sp; @@ -1211,7 +1210,6 @@ expmeta(char *enddir, char *name) scopy(dp->d_name, enddir); addfname(expdir); } else { - char *q; for (p = enddir, q = dp->d_name; (*p++ = *q++) != '\0';) continue; diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index cfd9e82..51ecee6 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -192,13 +192,7 @@ readcmd(int argc __unused, char **argv __unused) continue; } startword = 0; - if (backslash && c == '\\') { - if (read(STDIN_FILENO, &c, 1) != 1) { - status = 1; - break; - } - STPUTC(c, p); - } else if (ap[1] != NULL && strchr(ifs, c) != NULL) { + if (ap[1] != NULL && strchr(ifs, c) != NULL) { STACKSTRNUL(p); setvar(*ap, stackblock(), 0); ap++; diff --git a/bin/sh/trap.c b/bin/sh/trap.c index ca327b2..5f12379 100644 --- a/bin/sh/trap.c +++ b/bin/sh/trap.c @@ -382,7 +382,7 @@ onsig(int signo) */ if (Tflag && trap[signo] != NULL && - ! trap[signo][0] == '\0' && + ! (trap[signo][0] == '\0') && ! (trap[signo][0] == ':' && trap[signo][1] == '\0')) breakwaitcmd = 1; |