]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-scripts: Avoid shellcheck warning SC2155 (declare, assign)
authorMartin Schwenke <martin@meltin.net>
Thu, 14 Jul 2016 02:27:05 +0000 (12:27 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 21 Jul 2016 00:24:27 +0000 (02:24 +0200)
SC2155: Declare and assign separately to avoid masking return values.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tools/onnode

index eb91a365576cdd872cb34d68a1ed082a7f227b77..635cd0d5b1c10b512b246784a241c357fe680c90 100755 (executable)
@@ -197,8 +197,8 @@ get_any_available_node ()
     local all_nodes="$1"
 
     # We do a recursive onnode to find which nodes are up and running.
-    local out=$("$0" -pq all ctdb pnn 2>&1)
-    local line
+    local out line
+    out=$("$0" -pq all ctdb pnn 2>&1)
     while read line ; do 
        local pnn="${line#PNN:}"
        if [ "$pnn" != "$line" ] ; then