From 65273b48086f9f89e541b056cda6ca54db759eff Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 5 Jan 2018 07:28:58 +0000 Subject: [PATCH] bits is never null when we call ot. Add an assert to that effect and remove test for NULL. CID: 270774 --- usr.sbin/ifmcstat/printb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/ifmcstat/printb.c b/usr.sbin/ifmcstat/printb.c index 76b063fcb9e9..9481a0dc1bff 100644 --- a/usr.sbin/ifmcstat/printb.c +++ b/usr.sbin/ifmcstat/printb.c @@ -32,6 +32,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include /* @@ -43,7 +44,8 @@ printb(const char *s, unsigned int v, const char *bits) int i, any = 0; char c; - if (bits && *bits == 8) + assert(bits != NULL); + if (*bits == 8) printf("%s=%o", s, v); else printf("%s=%x", s, v);