On LP64 and LLP64 platforms, sizeof returns a 64-bit value, which is
larger than an int or unsigned int, so if you add the result of sizeof
to a value shorter than 64 bits, you can't print the result with %u.
As an M3UA parameter header is much shorter than 2^32 bytes, we can
safely just cast sizeof(struct m3ua_param_header) to u_int.
break;
/* ... */
default:
- ND_PRINT((ndo, "(length %u)", size + sizeof(struct m3ua_param_header)));
+ ND_PRINT((ndo, "(length %u)", size + (u_int)sizeof(struct m3ua_param_header)));
ND_TCHECK2(*buf, size);
}
return;