Source-Changes-HG archive

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

[src/trunk]: src/common/lib/libprop Sprinkle braces around _PROP_RWLOCK_UNLOC...



details:   https://anonhg.NetBSD.org/src/rev/1d0ba023a09d
branches:  trunk
changeset: 376358:1d0ba023a09d
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Jun 14 00:35:18 2023 +0000

description:
Sprinkle braces around _PROP_RWLOCK_UNLOCK() in ``if'' block.
It is expanded into /* nothing */ for _STANDALONE.

diffstat:

 common/lib/libprop/prop_dictionary.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 1a32a41e4ca3 -r 1d0ba023a09d common/lib/libprop/prop_dictionary.c
--- a/common/lib/libprop/prop_dictionary.c      Wed Jun 14 00:28:55 2023 +0000
+++ b/common/lib/libprop/prop_dictionary.c      Wed Jun 14 00:35:18 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: prop_dictionary.c,v 1.45 2022/08/03 21:13:46 riastradh Exp $   */
+/*     $NetBSD: prop_dictionary.c,v 1.46 2023/06/14 00:35:18 rin Exp $ */
 
 /*-
  * Copyright (c) 2006, 2007, 2020 The NetBSD Foundation, Inc.
@@ -915,15 +915,17 @@ static prop_object_t
        if (! prop_object_is_dictionary(pd))
                return (NULL);
 
-       if (!locked)
+       if (!locked) {
                _PROP_RWLOCK_RDLOCK(pd->pd_rwlock);
+       }
        pde = _prop_dict_lookup(pd, key, NULL);
        if (pde != NULL) {
                _PROP_ASSERT(pde->pde_objref != NULL);
                po = pde->pde_objref;
        }
-       if (!locked)
+       if (!locked) {
                _PROP_RWLOCK_UNLOCK(pd->pd_rwlock);
+       }
        return (po);
 }
 /*



Home | Main Index | Thread Index | Old Index