diff options
author | Olivier Certner <olce@FreeBSD.org> | 2024-09-04 14:38:12 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2024-09-04 15:00:56 +0000 |
commit | 4938f554469bc81783998143968ec3eba2a43def (patch) | |
tree | 715c46baa9ff0730f4cdfd4caffd1a49b256c606 | |
parent | b20ae160872071fc20e5dde27051792177057fa5 (diff) | |
download | src-4938f554469b.tar.gz src-4938f554469b.zip |
umtx: shm: 'ushm_refcnt > 0' => 'ushm_refcnt != 0'
'ushm_refcnt' is unsigned. Don't leave the impression it isn't.
No functional change (intended).
Reviewed by: kib
Approved by: emaste (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46126
(cherry picked from commit c75a18905e308f69b01f19c3d7d613883a008e79)
-rw-r--r-- | sys/kern/kern_umtx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 9a6df7ae20ff..2d54850da9c3 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -4359,7 +4359,7 @@ umtx_shm_find_reg_locked(const struct umtx_key *key, reg->ushm_key.info.shared.offset == key->info.shared.offset) { KASSERT(reg->ushm_key.type == TYPE_SHM, ("TYPE_USHM")); - KASSERT(reg->ushm_refcnt > 0, + KASSERT(reg->ushm_refcnt != 0, ("reg %p refcnt 0 onlist", reg)); KASSERT((reg->ushm_flags & USHMF_LINKED) != 0, ("reg %p not linked", reg)); @@ -4407,7 +4407,7 @@ static bool umtx_shm_unref_reg_locked(struct umtx_shm_reg *reg, bool linked_ref) { mtx_assert(&umtx_shm_lock, MA_OWNED); - KASSERT(reg->ushm_refcnt > 0, ("ushm_reg %p refcnt 0", reg)); + KASSERT(reg->ushm_refcnt != 0, ("ushm_reg %p refcnt 0", reg)); if (linked_ref) { if ((reg->ushm_flags & USHMF_LINKED) == 0) |