From 1c52c57e803b3b3b89ccbd26bf7405e4089095ce Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 26 Feb 2022 11:00:08 -0800 Subject: [PATCH] =?utf8?q?expr:=20[nfc]=20remove=20unnecessary=20parens=20?= =?utf8?q?in=20'eval(=E2=80=A6).string'=20expressions?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/expr/exeval.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/expr/exeval.c b/lib/expr/exeval.c index 535edab55..ac27d3820 100644 --- a/lib/expr/exeval.c +++ b/lib/expr/exeval.c @@ -861,9 +861,9 @@ exsplit(Expr_t * ex, Exnode_t * expr, void *env) size_t sz; Dt_t* arr = (Dt_t*)expr->data.split.array->local.pointer; - str = (eval(ex, expr->data.split.string, env)).string; + str = eval(ex, expr->data.split.string, env).string; if (expr->data.split.seps) - seps = (eval(ex, expr->data.split.seps, env)).string; + seps = eval(ex, expr->data.split.seps, env).string; else seps = " \t\n"; @@ -916,9 +916,9 @@ extokens(Expr_t * ex, Exnode_t * expr, void *env) size_t sz; Dt_t* arr = (Dt_t*)expr->data.split.array->local.pointer; - str = (eval(ex, expr->data.split.string, env)).string; + str = eval(ex, expr->data.split.string, env).string; if (expr->data.split.seps) - seps = (eval(ex, expr->data.split.seps, env)).string; + seps = eval(ex, expr->data.split.seps, env).string; else seps = " \t\n"; @@ -962,10 +962,10 @@ exsub(Expr_t * ex, Exnode_t * expr, void *env, bool global) int flags = STR_MAXIMAL; int ng; - str = (eval(ex, expr->data.string.base, env)).string; - pat = (eval(ex, expr->data.string.pat, env)).string; + str = eval(ex, expr->data.string.base, env).string; + pat = eval(ex, expr->data.string.pat, env).string; if (expr->data.string.repl) - repl = (eval(ex, expr->data.string.repl, env)).string; + repl = eval(ex, expr->data.string.repl, env).string; else repl = 0; -- 2.40.0