]> granicus.if.org Git - graphviz/commitdiff
pathplan: remove dead code in 'growtris'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 13 Nov 2022 18:12:20 +0000 (10:12 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 13 Nov 2022 22:55:49 +0000 (14:55 -0800)
The only call to `growtris` ensures this branch is false.

lib/pathplan/shortest.c

index 8ffc2fc16d2196ee35173ed7adc848cf4aabe69d..521fc18fd2f90558f08575ae8a6a3ee7c2afaf9c 100644 (file)
@@ -515,8 +515,6 @@ static int growpnls(size_t newpnln) {
 
 static int growtris(int newtrin)
 {
-    if (newtrin <= trin)
-       return 0;
     tris = realloc(tris, TRIANGLESIZE * newtrin);
     if (tris == NULL) {
        prerror("cannot realloc tris");