]> granicus.if.org Git - graphviz/commitdiff
remove some use of open coded NULL when calling agattr
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 15 Aug 2021 19:09:04 +0000 (12:09 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 19 Aug 2021 02:45:11 +0000 (19:45 -0700)
cmd/smyrna/gui/frmobjectui.c
lib/dotgen/sameport.c

index 7a5a6c2b0a163070e1dc73bb0e808c334d987b0d..98d5b9e6f989cf91abc635546f85b95e5b682155 100644 (file)
@@ -504,7 +504,7 @@ static void doApply (GtkWidget * widget, int doAll)
     attr = binarySearch(view->Topview->attributes, attr_name);
     assert(attr);
     attr->propagate = prog;
-    sym = agattr(g, objKind, attr_name, (char *) 0);
+    sym = agattr(g, objKind, attr_name, NULL);
     if (!sym)                  /*it shouldnt be null, just in case it is null */
        sym = agattr(g, objKind, attr_name, def_val);
     /*graph */
index 281fff8ce2496d5920ed77025eb832748274b076..396422a1b83e6d2f922cbc2e43b4ff831883e612 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <math.h>
 #include       <dotgen/dot.h>
-
+#include       <stddef.h>
 
 #define MAXSAME 5              /* max no of same{head,tail} groups on a node */
 
@@ -41,8 +41,8 @@ void dot_sameports(graph_t * g)
     int n_sametail;            /* number of same_t groups on current node */
     int i;
 
-    E_samehead = agattr(g, AGEDGE, "samehead",(char*)0);
-    E_sametail = agattr(g, AGEDGE, "sametail",(char*)0);
+    E_samehead = agattr(g, AGEDGE, "samehead", NULL);
+    E_sametail = agattr(g, AGEDGE, "sametail", NULL);
     if (!(E_samehead || E_sametail))
        return;
     for (n = agfstnode(g); n; n = agnxtnode(g, n)) {