summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorrin <rin@NetBSD.org>2023-06-14 00:35:18 +0000
committerrin <rin@NetBSD.org>2023-06-14 00:35:18 +0000
commit9e65593c6bc21ddba7ca2802f0bef80f8ea7fadb (patch)
treeedc716be69f8f1ca9aafe1240dd9d2e9953fb8e1 /common
parent99ae267720be3a4a9c8d308b5417b7ae28a87802 (diff)
Sprinkle braces around _PROP_RWLOCK_UNLOCK() in ``if'' block.
It is expanded into /* nothing */ for _STANDALONE.
Diffstat (limited to 'common')
-rw-r--r--common/lib/libprop/prop_dictionary.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/common/lib/libprop/prop_dictionary.c b/common/lib/libprop/prop_dictionary.c
index fd8dd79cb7a..f00c46ba02a 100644
--- a/common/lib/libprop/prop_dictionary.c
+++ b/common/lib/libprop/prop_dictionary.c
@@ -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 @@ _prop_dictionary_get(prop_dictionary_t pd, const char *key, bool locked)
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);
}
/*