CVSROOT: /cvs Module name: src Changes by: bl...@cvs.openbsd.org 2022/02/07 08:23:43
Modified files: sys/netinet6 : nd6.c nd6_nbr.c Log message: Checking ifaddr pointer for NULL without checking in6_ifaddr works as ifaddr ia_ifa is the first field of in6_ifaddr. So the pointers are the same, and one NULL check works for both. But in ISO C NULL has some kind of type and this is undefined behavior. So add a second NULL check that the compiler can optimize away. The resulting assembler is the same. found by kubsan; OK tobhe@