From e61f154a3e8638c5f8ebf7ecadaa2e8b41db496f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 10 Aug 2021 17:19:18 -0700 Subject: [PATCH] exsub: use a C99 bool for 'global' parameter to be clearer --- lib/expr/exeval.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/expr/exeval.c b/lib/expr/exeval.c index c6b3ecca1..149bcd31f 100644 --- a/lib/expr/exeval.c +++ b/lib/expr/exeval.c @@ -907,7 +907,7 @@ extokens(Expr_t * ex, Exnode_t * expr, void *env) * return string after pattern substitution */ static Extype_t -exsub(Expr_t * ex, Exnode_t * expr, void *env, int global) +exsub(Expr_t * ex, Exnode_t * expr, void *env, bool global) { char *str; char *pat; @@ -1153,9 +1153,9 @@ eval(Expr_t* ex, Exnode_t* expr, void* env) case TOKENS: return extokens(ex, expr, env); case GSUB: - return exsub(ex, expr, env, 1); + return exsub(ex, expr, env, /* global = */ true); case SUB: - return exsub(ex, expr, env, 0); + return exsub(ex, expr, env, /* global = */ false); case SUBSTR: return exsubstr(ex, expr, env); case SRAND: -- 2.40.0