]> granicus.if.org Git - graphviz/commitdiff
pack isLegal: remove the need for some casting
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 21 Sep 2022 02:32:46 +0000 (19:32 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 22 Sep 2022 00:00:18 +0000 (17:00 -0700)
lib/pack/ccomps.c

index 86ce2dd48b5e9f6fa873c30dec009350f78e4e70..4dc9abbb318685fd8e69d7c467e692d037599793 100644 (file)
@@ -84,10 +84,10 @@ static size_t dfs(Agraph_t * g, Agnode_t * n, void *state, stk_t* stk)
 
 static int isLegal(char *p)
 {
-    unsigned char c;
+    char c;
 
-    while ((c = *(unsigned char *) p++)) {
-       if (c != '_' && !isalnum(c))
+    while ((c = *p++)) {
+       if (c != '_' && !isalnum((int)c))
            return 0;
     }