]> granicus.if.org Git - graphviz/commitdiff
remove unnecessary casts of string table entries
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 8 Jul 2021 04:11:57 +0000 (21:11 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 18 Jul 2021 19:01:10 +0000 (12:01 -0700)
The right hand side of these expressions are already char pointers.

lib/cgraph/attr.c

index 0e3bd8eda9f85ce37d4245bd9eec3a2802758437..9815ef9824eb42e137949f88061092f595892534 100644 (file)
@@ -432,7 +432,7 @@ char *agget(void *obj, char *name)
        rv = 0;                 /* note was "", but this provides more info */
     else {
        data = agattrrec(obj);
-       rv = (char *) data->str[sym->id];
+       rv = data->str[sym->id];
     }
     return rv;
 }
@@ -444,7 +444,7 @@ char *agxget(void *obj, Agsym_t * sym)
 
     data = agattrrec(obj);
     assert(sym->id >= 0 && sym->id < topdictsize(obj));
-    rv = (char *) (data->str[sym->id]);
+    rv = data->str[sym->id];
     return rv;
 }