svn commit: r327580 - head/usr.sbin/ifmcstat
Warner Losh
imp at FreeBSD.org
Fri Jan 5 07:29:00 UTC 2018
Author: imp
Date: Fri Jan 5 07:28:58 2018
New Revision: 327580
URL: https://svnweb.freebsd.org/changeset/base/327580
Log:
bits is never null when we call ot. Add an assert to that effect and
remove test for NULL.
CID: 270774
Modified:
head/usr.sbin/ifmcstat/printb.c
Modified: head/usr.sbin/ifmcstat/printb.c
==============================================================================
--- head/usr.sbin/ifmcstat/printb.c Fri Jan 5 07:28:48 2018 (r327579)
+++ head/usr.sbin/ifmcstat/printb.c Fri Jan 5 07:28:58 2018 (r327580)
@@ -32,6 +32,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <assert.h>
#include <stdio.h>
/*
@@ -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);
More information about the svn-src-head
mailing list