IFCONFIG(8): Fix isdigit() and isprint() usage

This commit is contained in:
Sebastian Huber
2013-10-18 16:47:43 +02:00
parent 13b50b37cc
commit 8ff186f81f
3 changed files with 4 additions and 4 deletions

View File

@@ -52,7 +52,7 @@ setifgroup(const char *group_name, int d, int s, const struct afswtch *rafp)
memset(&ifgr, 0, sizeof(ifgr));
strlcpy(ifgr.ifgr_name, name, IFNAMSIZ);
if (group_name[0] && isdigit(group_name[strlen(group_name) - 1]))
if (group_name[0] && isdigit((unsigned char)group_name[strlen(group_name) - 1]))
errx(1, "setifgroup: group names may not end in a digit");
if (strlcpy(ifgr.ifgr_group, group_name, IFNAMSIZ) >= IFNAMSIZ)
@@ -70,7 +70,7 @@ unsetifgroup(const char *group_name, int d, int s, const struct afswtch *rafp)
memset(&ifgr, 0, sizeof(ifgr));
strlcpy(ifgr.ifgr_name, name, IFNAMSIZ);
if (group_name[0] && isdigit(group_name[strlen(group_name) - 1]))
if (group_name[0] && isdigit((unsigned char)group_name[strlen(group_name) - 1]))
errx(1, "unsetifgroup: group names may not end in a digit");
if (strlcpy(ifgr.ifgr_group, group_name, IFNAMSIZ) >= IFNAMSIZ)