Skip to content

Commit

Permalink
changed assert to VerifyOrDieWithMsg for better error reporting and c…
Browse files Browse the repository at this point in the history
…ode doc
  • Loading branch information
jtung-apple committed Aug 25, 2022
1 parent 99a55c6 commit c2b0bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/system/SystemPacketBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ void PacketBuffer::AddRef()
pbuf_ref(this);
#else // !CHIP_SYSTEM_CONFIG_USE_LWIP
LOCK_BUF_POOL();
assert(this->ref < UINT16_MAX);
VerifyOrDieWithMsg(this->ref < UINT16_MAX, chipSystemLayer, "packet buffer refcount overflow");
++this->ref;
UNLOCK_BUF_POOL();
#endif // !CHIP_SYSTEM_CONFIG_USE_LWIP
Expand Down

0 comments on commit c2b0bf3

Please sign in to comment.