Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/config ensure that pointer is filled in when used up...



details:   https://anonhg.NetBSD.org/src/rev/9b95c106b49b
branches:  trunk
changeset: 961230:9b95c106b49b
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Apr 13 03:09:42 2021 +0000

description:
ensure that pointer is filled in when used upon return.

diffstat:

 usr.bin/config/sem.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r d6c400fb34d2 -r 9b95c106b49b usr.bin/config/sem.c
--- a/usr.bin/config/sem.c      Tue Apr 13 02:11:39 2021 +0000
+++ b/usr.bin/config/sem.c      Tue Apr 13 03:09:42 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sem.c,v 1.84 2020/03/07 19:26:13 christos Exp $        */
+/*     $NetBSD: sem.c,v 1.85 2021/04/13 03:09:42 mrg Exp $     */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: sem.c,v 1.84 2020/03/07 19:26:13 christos Exp $");
+__RCSID("$NetBSD: sem.c,v 1.85 2021/04/13 03:09:42 mrg Exp $");
 
 #include <sys/param.h>
 #include <ctype.h>
@@ -828,10 +828,10 @@
        /*
         * Check if the existing attr is only referenced, not really defined.
         */
+       *ra = a;
        if (a->a_deps == NULL &&
            a->a_iattr == 0 &&
            a->a_devclass == 0) {
-               *ra = a;
                return (0);
        }
        return (1);



Home | Main Index | Thread Index | Old Index