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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user