af-xdp: suppress cppcheck false positive

As the cppcheck test suite does as well:
https://github.com/danmar/cppcheck/blob/main/test/cfg/posix.c#L311

Requires cppcheck --inline-suppr option to be used.
pull/10486/head
Victor Julien 2 years ago committed by Victor Julien
parent eb1d0c2cc2
commit 69f0e85785

@ -580,6 +580,7 @@ static inline ssize_t WakeupSocket(void *data)
/* Assuming kernel >= 5.11 in use if xdp_busy_poll is enabled */
if (ptv->xsk.enable_busy_poll || xsk_ring_prod__needs_wakeup(&ptv->umem.fq)) {
// cppcheck-suppress nullPointer
res = recvfrom(xsk_socket__fd(ptv->xsk.xsk), NULL, 0, MSG_DONTWAIT, NULL, NULL);
}

Loading…
Cancel
Save