From: Matthew Fernandez Date: Sun, 6 Feb 2022 06:03:48 +0000 (+1100) Subject: grammar.y pop: [nfc] fix incorrect pop from global stack X-Git-Tag: 3.0.0~39^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ebba9fd5e3fa29ac8e12e56ac145bc69ebe49847;p=graphviz grammar.y pop: [nfc] fix incorrect pop from global stack This function was incorrectly referencing the global stack, `S`, instead of the stack passed in. This change is marked NFC because `pop` is only ever called with `S` as a parameter, but it still seemed worth correcting. --- diff --git a/lib/cgraph/grammar.y b/lib/cgraph/grammar.y index daa90f432..bf47373db 100644 --- a/lib/cgraph/grammar.y +++ b/lib/cgraph/grammar.y @@ -227,7 +227,7 @@ static gstack_t *push(gstack_t *s, Agraph_t *subg) { static gstack_t *pop(gstack_t *s) { gstack_t *rv; - rv = S->down; + rv = s->down; agfree(G,s); return rv; }