/* Check that we did add this route or not */
sk = skp = xstrdup(dhcpcd_skiproutes);
while ((token = strsep(&skp, ","))) {
- if (isdigit(*token) && atoi(token) == i)
+ if (isdigit((unsigned)*token) && atoi(token) == i)
break;
}
free(sk);
#include <net/route.h>
#include <netinet/in.h>
-#include <ctype.h>
#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <netinet/ether.h>
#include <netpacket/packet.h>
-#include <ctype.h>
#include <errno.h>
#include <stddef.h>
#include <stdio.h>
{
CODE *c;
- if (isdigit((int)*priority))
+ if (isdigit((unsigned)*priority))
return atoi(priority);
for (c = prioritynames; c->c_name; c++)
if (!strcasecmp(priority, c->c_name))
return 0;
}
/* Ensure that digits are hex */
- if (isxdigit ((int)c[0]) == 0 || isxdigit((int)c[1]) == 0) {
+ if (isxdigit((unsigned)c[0]) == 0 ||
+ isxdigit((unsigned)c[1]) == 0)
+ {
errno = EINVAL;
return 0;
}