dp0->ip6r0_reserved evaluates to a pointer to the first element of the
array, which is always non-null, so it doesn't test whether the *value*
of the field is non-zero. Call EXTRACT_32BITS() on it to check whether
the value is zero.
dp0 = (const struct ip6_rthdr0 *)dp;
ND_TCHECK(dp0->ip6r0_reserved);
- if (dp0->ip6r0_reserved || ndo->ndo_vflag) {
+ if (EXTRACT_32BITS(dp0->ip6r0_reserved) || ndo->ndo_vflag) {
ND_PRINT((ndo, ", rsv=0x%0x",
EXTRACT_32BITS(&dp0->ip6r0_reserved)));
}