]> granicus.if.org Git - graphviz/commitdiff
remove some now-redundant error handling from a call to N_NEW
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 16 Jun 2020 00:57:12 +0000 (17:57 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 16 Jun 2020 14:23:28 +0000 (07:23 -0700)
The N_NEW wrapper now exits on allocation failure, rendering this code path
redundant.

lib/dotgen/decomp.c

index 505bac0028222124fe00c0555f4979e89847f81b..7af7233a969191f0a2e3ef23653fd5311fb7e83c 100644 (file)
@@ -102,9 +102,6 @@ static void push(stk_t* sp, node_t * np)
             bp->prev = sp->curblk;
             bp->next = NULL;
             bp->data = N_NEW(BIGBUF, Agnode_t *);
-            if (bp->data == 0) {
-                agerr(AGERR, "dot: Out of memory\n");
-            }
             bp->endp = bp->data + BIGBUF;
             sp->curblk->next = bp;
         }