]> granicus.if.org Git - graphviz/commitdiff
gvpr: rephrase unorthodox way of clamping a signed byte
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 16 May 2022 04:24:58 +0000 (21:24 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 23 May 2022 00:59:30 +0000 (17:59 -0700)
This new code is less confusing to the compiler and removes a -Wsign-conversion
warning.

lib/gvpr/compile.c

index 73ff642dacb61c23a959812db6b5de5d5aaf7661..3e5517dbacf401b7b5bda8f29129ff228a300da3 100644 (file)
@@ -349,7 +349,7 @@ static void assignable (Agobj_t *objp, unsigned char* name) {
 
     TFA_Init();
     while (TFA_State >= 0 && (ch = *p)) {
-        TFA_Advance(ch & ~127 ? 127 : ch);
+        TFA_Advance(ch 127 ? 127 : ch);
         p++;
     }
     rv = TFA_Definition();