From 13689a6c8aaa0dbde2395191620fa8f61b8d16a8 Mon Sep 17 00:00:00 2001 From: kre Date: Sat, 30 Dec 2017 23:24:19 +0000 Subject: [PATCH] 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. --- bin/sh/jobs.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index bd605c00997d..a58eaf49f0f1 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -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 *jp, int mode) 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