Replace all asserts in kernel code with ASSERT

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2024-05-13 19:30:47 +08:00 • committed by Alan Carvalho de Assis
parent f25a506f91
commit 20ebe0e64c
27 changed files with 72 additions and 72 deletions

View file

@ -171,7 +171,7 @@ ip_fragout_allocfragbuf(FAR struct iob_queue_s *fragq);
static void ip_fragin_timerout_expiry(wdparm_t arg)
{
assert(g_wkfragtimeout.worker == NULL);
ASSERT(g_wkfragtimeout.worker == NULL);
work_queue(IPFRAGWORK, &g_wkfragtimeout, ip_fragin_timerwork, NULL, 0);
}
@ -525,7 +525,7 @@ ip_fragout_allocfragbuf(FAR struct iob_queue_s *fragq)
uint32_t ip_frag_remnode(FAR struct ip_fragsnode_s *node)
{
g_bufoccupy -= node->bufcnt;
assert(g_bufoccupy < CONFIG_IOB_NBUFFERS);
ASSERT(g_bufoccupy < CONFIG_IOB_NBUFFERS);
sq_rem((FAR sq_entry_t *)node, &g_assemblyhead_ipid);
sq_rem((FAR sq_entry_t *)&node->flinkat, &g_assemblyhead_time);
@ -799,7 +799,7 @@ int32_t ip_fragout_slice(FAR struct iob_s *iob, uint8_t domain, uint16_t mtu,
return 0;
}
assert(iob->io_pktlen > mtu);
ASSERT(iob->io_pktlen > mtu);
#ifdef CONFIG_NET_IPv4
if (domain == PF_INET)

View file

@ -378,7 +378,7 @@ int32_t ipv4_fragout(FAR struct net_driver_s *dev, uint16_t mtu)
*/
nfrags = ip_fragout_slice(dev->d_iob, PF_INET, mtu, hdrlen, &fragq);
assert(nfrags > 1);
ASSERT(nfrags > 1);
netdev_iob_clear(dev);
/* Fill the L3 header into the reserved space */

View file

@ -588,7 +588,7 @@ int32_t ipv6_fragout(FAR struct net_driver_s *dev, uint16_t mtu)
*/
nfrags = ip_fragout_slice(dev->d_iob, PF_INET6, mtu, unfraglen, &fragq);
assert(nfrags > 1);
ASSERT(nfrags > 1);
netdev_iob_clear(dev);
ipid = ++g_ipv6id;