ifconfig: fix UBSan signed shift error

Use 1u since UBSan complains about 1 << 31.
This commit is contained in:
Alex Richardson 2021-01-19 11:35:21 +00:00
parent a8b20f4fab
commit 94ac312a71

View File

@ -1514,7 +1514,7 @@ printb(const char *s, unsigned v, const char *bits)
bits++;
putchar('<');
while ((i = *bits++) != '\0') {
if (v & (1 << (i-1))) {
if (v & (1u << (i-1))) {
if (any)
putchar(',');
any = 1;