diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2013-11-21 17:24:35 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2013-11-21 17:24:35 +0000 |
commit | 65b268b253c31f769eaa1004edd7d6fec6ea512e (patch) | |
tree | b2b89abef41d76f91103af35b23e5e65059d4921 /sbin/ifconfig/ifconfig.c | |
parent | dce81ecdfcff3d45ce3aae2c14acb9ff18c6210f (diff) |
Make the bit string unsigned char * in printb() and printb_status().
In practice we shouldn't have chars > 127 in these but it is better
not to assume this. OK deraadt@
Diffstat (limited to 'sbin/ifconfig/ifconfig.c')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 5180c59b302..a682ee80571 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.277 2013/11/12 04:59:02 deraadt Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.278 2013/11/21 17:24:34 millert Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -505,7 +505,7 @@ int getinfo(struct ifreq *, int); void getsock(int); void printgroupattribs(char *); void printif(char *, int); -void printb_status(unsigned short, char *); +void printb_status(unsigned short, unsigned char *); const char *get_linkstate(int, int); void status(int, struct sockaddr_dl *, int); void usage(int); @@ -4556,10 +4556,10 @@ in_getprefix(const char *plen, int which) * Print a value a la the %b format of the kernel's printf */ void -printb(char *s, unsigned int v, char *bits) +printb(char *s, unsigned int v, unsigned char *bits) { int i, any = 0; - char c; + unsigned char c; if (bits && *bits == 8) printf("%s=%o", s, v); @@ -4588,10 +4588,10 @@ printb(char *s, unsigned int v, char *bits) * A simple version of printb for status output */ void -printb_status(unsigned short v, char *bits) +printb_status(unsigned short v, unsigned char *bits) { int i, any = 0; - char c; + unsigned char c; if (bits) { bits++; |