Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh initialize the jobtab; it is easier than putting chec...



details:   https://anonhg.NetBSD.org/src/rev/eb30b2fc272f
branches:  trunk
changeset: 358448:eb30b2fc272f
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Dec 30 01:21:25 2017 +0000

description:
initialize the jobtab; it is easier than putting checks for used everywhere.

diffstat:

 bin/sh/jobs.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r a69f170a0468 -r eb30b2fc272f bin/sh/jobs.c
--- a/bin/sh/jobs.c     Sat Dec 30 00:14:19 2017 +0000
+++ b/bin/sh/jobs.c     Sat Dec 30 01:21:25 2017 +0000
@@ -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 @@
                        }
                        jp = jobtab + njobs;
                        for (i = 4 ; --i >= 0 ; )
-                               jobtab[njobs++].used = 0;
+                               memset(&jobtab[njobs++], 0, sizeof(*jobtab));
                        INTON;
                        break;
                }



Home | Main Index | Thread Index | Old Index