From ebba9fd5e3fa29ac8e12e56ac145bc69ebe49847 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 6 Feb 2022 17:03:48 +1100 Subject: [PATCH] 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. --- lib/cgraph/grammar.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.40.0