From: Matthew Fernandez Date: Sun, 27 Sep 2020 20:57:39 +0000 (-0700) Subject: remove no longer necessary setjmp setup in libpack X-Git-Tag: 2.46.0~20^2^2~54^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44f1fff7c1b7ebd4692180b3eb2d6519f92b6937;p=graphviz remove no longer necessary setjmp setup in libpack Related to #1801. --- diff --git a/lib/pack/ccomps.c b/lib/pack/ccomps.c index a20c91289..ec5cf2f05 100644 --- a/lib/pack/ccomps.c +++ b/lib/pack/ccomps.c @@ -14,13 +14,10 @@ #include #include -#include #include #include #include -static jmp_buf jbuf; - #define MARKED(stk,n) ((stk)->markfn(n,-1)) #define MARK(stk,n) ((stk)->markfn(n,1)) #define UNMARK(stk,n) ((stk)->markfn(n,0)) @@ -228,10 +225,6 @@ Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, boolean * pinned) for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNMARK(&stk,n); - if (setjmp(jbuf)) { - error = 1; - goto packerror; - } /* Component with pinned nodes */ for (n = agfstnode(g); n; n = agnxtnode(g, n)) { if (MARKED(&stk,n) || !isPinned(n)) @@ -323,14 +316,6 @@ Agraph_t **ccomps(Agraph_t * g, int *ncc, char *pfx) for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNMARK(&stk,n); - if (setjmp(jbuf)) { - freeStk (&stk); - free (ccs); - if (name != buffer) - free(name); - *ncc = 0; - return NULL; - } for (n = agfstnode(g); n; n = agnxtnode(g, n)) { if (MARKED(&stk,n)) continue; @@ -727,11 +712,6 @@ int isConnected(Agraph_t * g) for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNMARK(&stk,n); - if (setjmp(jbuf)) { - freeStk (&stk); - return -1; - } - n = agfstnode(g); cnt = dfs(g, agfstnode(g), NULL, &stk); freeStk (&stk);