tests: Cleanup islower() warning.
authorJustin Pettit <jpettit@nicira.com>
Tue, 25 Aug 2009 23:33:16 +0000 (16:33 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 25 Aug 2009 23:37:28 +0000 (16:37 -0700)
NetBSD's gcc complains if islower()'s argument is an unadorned char.  This
provides an appropriate cast.

tests/test-stp.c

index c2a58377cb773512c6ef78d6eec57e6401d65262..ce9decc8d87b2fbb4ffecc96aa017ba4da11e187 100644 (file)
@@ -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 "