[prev in list] [next in list] [prev in thread] [next in thread]
List: openvswitch-discuss
Subject: [ovs-discuss] [PATCH 3/4] tests: Cleanup islower() warning.
From: jpettit () nicira ! com (Justin Pettit)
Date: 2009-08-26 0:08:14
Message-ID: 1251245295-26905-3-git-send-email-jpettit () nicira ! com
[Download RAW message or body]
NetBSD's gcc complains if islower()'s argument is an unadorned char. This
provides an appropriate cast.
---
tests/test-stp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tests/test-stp.c b/tests/test-stp.c
index c2a5837..ce9decc 100644
--- a/tests/test-stp.c
+++ b/tests/test-stp.c
@@ -501,7 +501,8 @@ main(int argc, char *argv[])
if (!strcmp(token, "0")) {
lan = NULL;
- } else if (strlen(token) == 1 && islower(*token)) {
+ } else if (strlen(token) == 1
+ && islower((unsigned char)*token)) {
lan = tc->lans[*token - 'a'];
} else {
err("%s is not a valid LAN name "
--
1.6.0.6
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic