Module Name: src
Committed By: kre
Date: Sat Dec 30 23:24:19 UTC 2017
Modified Files:
src/bin/sh: jobs.c
Log Message:
In addition to previous the which fixed a (harmless) MSAN detected ref
of uninit'd field also fix a couple more (still harmless) related
technical C usage bugs.
Explaining why these issues were harmless would take too long to include here.
To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/bin/sh/jobs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/sh/jobs.c
diff -u src/bin/sh/jobs.c:1.97 src/bin/sh/jobs.c:1.98
--- src/bin/sh/jobs.c:1.97 Sat Dec 30 20:42:28 2017
+++ src/bin/sh/jobs.c Sat Dec 30 23:24:19 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: jobs.c,v 1.97 2017/12/30 20:42:28 christos Exp $ */
+/* $NetBSD: jobs.c,v 1.98 2017/12/30 23:24:19 kre Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: jobs.c,v 1.97 2017/12/30 20:42:28 christos Exp $");
+__RCSID("$NetBSD: jobs.c,v 1.98 2017/12/30 23:24:19 kre Exp $");
#endif
#endif /* not lint */
@@ -465,9 +465,11 @@ showjob(struct output *out, struct job *
fmtstr(s, 16, "[%ld] %c ",
(long)(jp - jobtab + 1),
#if JOBS
- jp == jobtab + curjob ? '+' :
- curjob != -1 && jp == jobtab +
- jobtab[curjob].prev_job ? '-' :
+ jp - jobtab == curjob ?
+ '+' :
+ curjob != -1 &&
+ jp - jobtab == jobtab[curjob].prev_job ?
+ '-' :
#endif
' ');
else