diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-11-20 17:22:47 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-11-20 17:22:47 +0000 |
commit | 08d5fd2c253b868620a392b6da2f220d83168fac (patch) | |
tree | 5a12feb70accca111c8055ad9609e69b69b41bb9 /sbin | |
parent | 6650892e5a2dee7311d2eead9fab07f5125effac (diff) |
cleanups for signed char vs ctype
ok krw
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/dhclient.c | 6 | ||||
-rw-r--r-- | sbin/dhclient/parse.c | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 6abdb1d6430..b8028bad55c 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.267 2013/11/11 21:00:01 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.268 2013/11/20 17:22:46 deraadt Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -1830,11 +1830,11 @@ int res_hnok(const char *name) { const char *dn = name; - int pch = '.', ch = *dn++; + int pch = '.', ch = (unsigned char)*dn++; int warn = 0; while (ch != '\0') { - int nch = *dn++; + int nch = (unsigned char)*dn++; if (ch == '.') { ; diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c index 7004ed6b5be..69a5b605ae3 100644 --- a/sbin/dhclient/parse.c +++ b/sbin/dhclient/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.25 2013/11/11 21:00:01 krw Exp $ */ +/* $OpenBSD: parse.c,v 1.26 2013/11/20 17:22:46 deraadt Exp $ */ /* Common parser code for dhcpd and dhclient. */ @@ -256,7 +256,8 @@ convert_num(unsigned char *buf, char *str, int base, int size) if (ptr[1] == 'x') { base = 16; ptr += 2; - } else if (isascii(ptr[1]) && isdigit(ptr[1])) { + } else if (isascii((unsigned char)ptr[1]) && + isdigit((unsigned char)ptr[1])) { base = 8; ptr += 1; } else |