diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2015-10-14 07:58:15 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2015-10-14 07:58:15 +0000 |
commit | 7e592b8724e4beef8ad0e1836f0535a858ef92b3 (patch) | |
tree | fe741503b4abcf52bf556a4bb4b4d2805a42c829 /usr.sbin | |
parent | 508621003dcf2cef2645cdf55945aaf311b906f7 (diff) |
More (unsigned char) casts for ctype functions.
Pointed out by Michael McConville
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/relayd/relayd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index c881bab53bb..9fac1207a1c 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.143 2015/07/29 20:55:43 benno Exp $ */ +/* $OpenBSD: relayd.c,v 1.144 2015/10/14 07:58:14 reyk Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -1366,7 +1366,7 @@ canonicalize_host(const char *host, char *name, size_t len) for (i = j = 0; i < plen; i++) { if (j >= (len - 1)) goto fail; - c = tolower(host[i]); + c = tolower((unsigned char)host[i]); if ((c == '.') && (j == 0 || name[j - 1] == '.')) continue; name[j++] = c; @@ -1497,7 +1497,8 @@ get_string(u_int8_t *ptr, size_t len) char *str; for (i = 0; i < len; i++) - if (!(isprint(ptr[i]) || isspace(ptr[i]))) + if (!(isprint((unsigned char)ptr[i]) || + isspace((unsigned char)ptr[i]))) break; if ((str = calloc(1, i + 1)) == NULL) |