[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: remove useless variable tests in runtest.exp

From: Jacob Bachmeyer
Subject: PATCH: remove useless variable tests in runtest.exp
Date: Sat, 01 Dec 2018 20:00:39 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090807 MultiZilla/ SeaMonkey/1.1.17 Mnenhy/

I had overlooked this earlier but noticed it during the review for my previous patch that added --local_init and --global_init options. The "convenience abbreviations" "hex" and "decimal" were set only if they do not already have a value, but this test is early enough that there is no way for them to have been given a value.

ChangeLog entry:
        * runtest.exp: Remove useless tests before setting "hex" and
        "decimal" to regexp fragments.

diff --git a/runtest.exp b/runtest.exp
index c7a6f26..b0ddfed 100644
--- a/runtest.exp
+++ b/runtest.exp
@@ -99,12 +99,8 @@ unset -nocomplain env(CCACHE_NODISABLE)
# some convenience abbreviations
-if {![info exists hex]} {
-    set hex "0x\[0-9A-Fa-f\]+"
-if {![info exists decimal]} {
-    set decimal "\[0-9\]+"
+set hex "0x\[0-9A-Fa-f\]+"
+set decimal "\[0-9\]+"

# set the base dir (current working directory)

-- Jacob

reply via email to

[Prev in Thread] Current Thread [Next in Thread]