2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

Cleanup isdigit() warnings.

NetBSD's gcc complains if isdigit()'s argument is an unadorned char.  This
provides an appropriate cast.
This commit is contained in:
Justin Pettit
2009-08-25 14:11:44 -07:00
parent 00908dc27a
commit be2c418b73
7 changed files with 17 additions and 9 deletions

View File

@@ -160,7 +160,7 @@ get_dp_netdev(const struct dpif *dpif)
static int
name_to_dp_idx(const char *name)
{
if (!strncmp(name, "dp", 2) && isdigit(name[2])) {
if (!strncmp(name, "dp", 2) && isdigit((unsigned char)name[2])) {
int dp_idx = atoi(name + 2);
if (dp_idx >= 0 && dp_idx < N_DP_NETDEVS) {
return dp_idx;