aboutsummaryrefslogtreecommitdiff
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2021-01-19 11:35:21 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2021-01-25 15:09:50 +0000
commit94ac312a71683a3a1a928c6adfe927d6bb45044f (patch)
tree6f1c9206eedd467ff153744549e1895230c176f8 /sbin/ifconfig
parenta8b20f4fabbca9bef377009429848d4f9cea18ae (diff)
downloadsrc-94ac312a71683a3a1a928c6adfe927d6bb45044f.tar.gz
src-94ac312a71683a3a1a928c6adfe927d6bb45044f.zip
ifconfig: fix UBSan signed shift error
Use 1u since UBSan complains about 1 << 31.
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index e6e7908e18cd..90a84f2996bc 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -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;