]> granicus.if.org Git - graphviz/commitdiff
remove some now-redundant error handling following a call to NEW()
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 16 Jun 2020 00:05:21 +0000 (17:05 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 16 Jun 2020 14:23:28 +0000 (07:23 -0700)
Allocation failures in NEW() now cause an error message and exit, so this code
path was redundant.

lib/dotgen/decomp.c

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