aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ash.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/shell/ash.c b/shell/ash.c
index cb674e69c..d4ee4c93e 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -3962,7 +3962,6 @@ getjob(const char *name, int getctl)
3962 unsigned num; 3962 unsigned num;
3963 int c; 3963 int c;
3964 const char *p; 3964 const char *p;
3965 char *(*match)(const char *, const char *);
3966 3965
3967 jp = curjob; 3966 jp = curjob;
3968 p = name; 3967 p = name;
@@ -4003,15 +4002,12 @@ getjob(const char *name, int getctl)
4003 } 4002 }
4004 } 4003 }
4005 4004
4006 match = prefix;
4007 if (*p == '?') {
4008 match = strstr;
4009 p++;
4010 }
4011
4012 found = NULL; 4005 found = NULL;
4013 while (jp) { 4006 while (jp) {
4014 if (match(jp->ps[0].ps_cmd, p)) { 4007 if (*p == '?'
4008 ? strstr(jp->ps[0].ps_cmd, p + 1)
4009 : prefix(jp->ps[0].ps_cmd, p)
4010 ) {
4015 if (found) 4011 if (found)
4016 goto err; 4012 goto err;
4017 found = jp; 4013 found = jp;