]> granicus.if.org Git - graphviz/commitdiff
expr exccopen: remove shadowing of 'expr' global
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 4 Jan 2023 04:18:02 +0000 (20:18 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 8 Jan 2023 19:57:18 +0000 (11:57 -0800)
lib/expr/excc.c

index 006bdf59dc33e436d9822a369a4b1e3b15241517..c12ff10532e1b02c346521212da3ff5f68678bd0 100644 (file)
@@ -648,7 +648,7 @@ global(Dt_t* table, void* object, void* handle)
  * open C program generator context
  */
 
-static Excc_t *exccopen(Expr_t *expr, Exccdisc_t *disc) {
+static Excc_t *exccopen(Expr_t *ex, Exccdisc_t *disc) {
        Excc_t* cc;
        char*                   id;
 
@@ -656,8 +656,8 @@ static Excc_t *exccopen(Expr_t *expr, Exccdisc_t *disc) {
                id = "";
        if (!(cc = newof(0, Excc_t, 1, strlen(id) + 2)))
                return 0;
-       cc->expr = expr;
-       cc->disc = expr->disc;
+       cc->expr = ex;
+       cc->disc = ex->disc;
        cc->id = (char*)(cc + 1);
        cc->ccdisc = disc;
        if (!(disc->flags & EX_CC_DUMP))
@@ -667,7 +667,7 @@ static Excc_t *exccopen(Expr_t *expr, Exccdisc_t *disc) {
                if (*id)
                        snprintf(cc->id, strlen(id) + 2, "%s_", id);
                agxbputc(disc->text, '\n');
-               dtwalk(expr->symbols, global, disc->text);
+               dtwalk(ex->symbols, global, disc->text);
        }
        return cc;
 }