Skip to content

Commit

Permalink
umtx: shm: 'ushm_refcnt > 0' => 'ushm_refcnt != 0'
Browse files Browse the repository at this point in the history
'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)
  • Loading branch information
OlCe2 authored and brooksdavis committed Sep 6, 2024
1 parent a293f2a commit eb6ce17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sys/kern/kern_umtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -4412,7 +4412,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));
Expand Down Expand Up @@ -4460,7 +4460,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)
Expand Down

0 comments on commit eb6ce17

Please sign in to comment.