diff options
author | tjr <tjr@FreeBSD.org> | 2002-07-11 04:22:41 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-07-11 04:22:41 +0000 |
commit | 0087ce2988c026fb6a09181ccd0528102f00bbde (patch) | |
tree | dc1fe3165e5127d1d6f052e0b21bef8f9729c58d /bin | |
parent | 3690d03377142839812b5b9e2b96e02098062a1e (diff) | |
download | FreeBSD-src-0087ce2988c026fb6a09181ccd0528102f00bbde.zip FreeBSD-src-0087ce2988c026fb6a09181ccd0528102f00bbde.tar.gz |
When growing the job table, don't relocate the jobmru pointer if it's NULL.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/jobs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index c0d3e4f..845fb15 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -617,7 +617,8 @@ makejob(union node *node __unused, int nprocs) memcpy(jp, jobtab, njobs * sizeof jp[0]); #if JOBS /* Relocate `next' pointers and list head */ - jobmru = &jp[jobmru - jobtab]; + if (jobmru != NULL) + jobmru = &jp[jobmru - jobtab]; for (i = 0; i < njobs; i++) if (jp[i].next != NULL) jp[i].next = &jp[jp[i].next - |