From b4d411c116df1728c164d8264b55ac04991a5651 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Sun, 5 Jan 2025 02:48:35 +0000 Subject: [PATCH] slightly more compact code formatting --- src/cmd/ksh93/sh/xec.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/cmd/ksh93/sh/xec.c b/src/cmd/ksh93/sh/xec.c index b990b9249986..1ea9b56313ca 100644 --- a/src/cmd/ksh93/sh/xec.c +++ b/src/cmd/ksh93/sh/xec.c @@ -2382,16 +2382,12 @@ int sh_exec(const Shnode_t *t, int flags) if(npv) { if(!sh.mktype) - { + { /* + * Set the discipline function. If this is done in a subshell, the variable + * must be scoped to the subshell before nvfun is set to the discipline. + */ if(sh.subshell && !sh.subshare) - { - /* - * When a variable is given a discipline function in - * a subshell, the variable must be scoped to the - * subshell before nvfun is set to the discipline. - */ sh_assignok(npv, 1); - } cp = nv_setdisc(npv,cp,np,(Namfun_t*)npv); } if(!cp)