[Asterisk-code-review] ast coredumper: Don't use "declare -n" (asterisk[13])

George Joseph asteriskteam at digium.com
Thu Oct 4 07:27:36 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/10412 )

Change subject: ast_coredumper: Don't use "declare -n"
......................................................................

ast_coredumper: Don't use "declare -n"

Change-Id: I7ddfed4cd6549a0cd458e4d5cf9ac95d784de6cb
---
M contrib/scripts/ast_coredumper
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  Corey Farrell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  George Joseph: Approved for Submit



diff --git a/contrib/scripts/ast_coredumper b/contrib/scripts/ast_coredumper
index b2ab4ac..df5242b 100755
--- a/contrib/scripts/ast_coredumper
+++ b/contrib/scripts/ast_coredumper
@@ -235,8 +235,8 @@
 
 readconf() {
 	while read line ; do
-		declare -n v=${line%%=*}
-		[ -z "${v}" ] && eval $line || :
+		v=${line%%=*}
+		[ -z "${!v}" ] && eval $line || :
 	done <<EOF
 $( sed -r -e "/\s*#/d" -e "/^\s*$/d" $1 )
 EOF

-- 
To view, visit https://gerrit.asterisk.org/10412
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ddfed4cd6549a0cd458e4d5cf9ac95d784de6cb
Gerrit-Change-Number: 10412
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181004/30c6c7ce/attachment.html>


More information about the asterisk-code-review mailing list