]> granicus.if.org Git - graphviz/commitdiff
gvpack: remove unnecessary guard in 'readGraphs'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 16 Apr 2022 04:09:45 +0000 (21:09 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 25 Apr 2022 02:12:49 +0000 (19:12 -0700)
This function is only ever called with a non-null 'cp'.

cmd/tools/gvpack.cpp

index 15d37b2061ffe0c19ca24a1a9dfe8ec7bda64415..c4e0997b46416ebe5301f3b939423556ec3cbe5b 100644 (file)
@@ -764,8 +764,7 @@ static Agraph_t **readGraphs(int *cp, GVC_t* gvc)
     }
 
     gs = RALLOC(cnt, gs, Agraph_t *);
-    if (cp)
-       *cp = cnt;
+    *cp = cnt;
     return gs;
 }