ifconfig: Shift unsigned value to avoid UB.

Reported by:	kib@
This commit is contained in:
Navdeep Parhar 2023-07-20 10:42:15 -07:00
parent e0a63d875e
commit 88284368fa

View file

@ -88,7 +88,7 @@ print_bits(const char *btype, uint32_t *v, const int v_count,
int num = 0;
for (int i = 0; i < v_count * 32; i++) {
bool is_set = v[i / 32] & (1 << (i % 32));
bool is_set = v[i / 32] & (1U << (i % 32));
if (is_set) {
if (num++ == 0)
printf("<");