Module Name: src Committed By: christos Date: Sat Dec 30 01:21:25 UTC 2017
Modified Files: src/bin/sh: jobs.c Log Message: initialize the jobtab; it is easier than putting checks for used everywhere. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 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.95 src/bin/sh/jobs.c:1.96 --- src/bin/sh/jobs.c:1.95 Sat Oct 28 02:36:17 2017 +++ src/bin/sh/jobs.c Fri Dec 29 20:21:25 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: jobs.c,v 1.95 2017/10/28 06:36:17 kre Exp $ */ +/* $NetBSD: jobs.c,v 1.96 2017/12/30 01:21:25 christos 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.95 2017/10/28 06:36:17 kre Exp $"); +__RCSID("$NetBSD: jobs.c,v 1.96 2017/12/30 01:21:25 christos Exp $"); #endif #endif /* not lint */ @@ -1054,7 +1054,7 @@ makejob(union node *node, int nprocs) } jp = jobtab + njobs; for (i = 4 ; --i >= 0 ; ) - jobtab[njobs++].used = 0; + memset(&jobtab[njobs++], 0, sizeof(*jobtab)); INTON; break; }