]> granicus.if.org Git - graphviz/commitdiff
common writenodeandport: remove shadowing of 'port' global
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 28 Dec 2022 18:10:03 +0000 (10:10 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 31 Dec 2022 22:31:10 +0000 (14:31 -0800)
lib/common/output.c

index 82faa2859cfaced8dc766dd651539b4838898dab..ed23f769e7639e67c709ad0a8300e972e05f4310 100644 (file)
@@ -94,16 +94,15 @@ static char* canon (graph_t *g, char* s)
     return cs;
 }
 
-static void writenodeandport(FILE * f, node_t * node, char *port)
-{
+static void writenodeandport(FILE *f, node_t *node, char *portname) {
     char *name;
     if (IS_CLUST_NODE(node))
        name = canon (agraphof(node), strchr(agnameof(node), ':') + 1);
     else
        name = agcanonStr (agnameof(node));
     printstring(f, " ", name); /* slimey i know */
-    if (port && *port)
-       printstring(f, ":", agcanonStr(port));
+    if (portname && *portname)
+       printstring(f, ":", agcanonStr(portname));
 }
 
 /* _write_plain: