bits is never null when we call ot. Add an assert to that effect and

remove test for NULL.

CID: 270774
This commit is contained in:
Warner Losh 2018-01-05 07:28:58 +00:00
parent 6dc0176690
commit 65273b4808
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327580

View File

@ -32,6 +32,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
__FBSDID("$FreeBSD$"); __FBSDID("$FreeBSD$");
#include <assert.h>
#include <stdio.h> #include <stdio.h>
/* /*
@ -43,7 +44,8 @@ printb(const char *s, unsigned int v, const char *bits)
int i, any = 0; int i, any = 0;
char c; char c;
if (bits && *bits == 8) assert(bits != NULL);
if (*bits == 8)
printf("%s=%o", s, v); printf("%s=%o", s, v);
else else
printf("%s=%x", s, v); printf("%s=%x", s, v);