Change variable name to clarify code
authorSteve McIntyre <steve@einval.com>
Thu, 1 Mar 2018 21:19:50 +0000 (21:19 +0000)
committerSteve McIntyre <steve@einval.com>
Thu, 1 Mar 2018 21:19:50 +0000 (21:19 +0000)
Shellcheck sees we use UTRACKNUM here in a subshell and elsewhere
outside of it. To reduce the chance of code confusion, use a different
temporary variable name here.

abcde

diff --git a/abcde b/abcde
index 6fc65e7..d542002 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -1083,18 +1083,18 @@ do_nogap_encode ()
                                (
                                        cd "${ABCDETEMPDIR}"
                                        TRACKFILES=
-                                       for UTRACKNUM in $TRACKQUEUE
+                                       for THISTRACKNUM in $TRACKQUEUE
                                        do
-                                               TRACKFILES="$TRACKFILES track$UTRACKNUM.wav"
+                                               TRACKFILES="$TRACKFILES track$THISTRACKNUM.wav"
                                        done
                                        nice $ENCNICE $MP3ENCODER $MP3ENCODEROPTS --nogap $TRACKFILES
                                        RETURN=$?
                                        if [ "$RETURN" != "0" ]; then
                                                echo "nogap-encode: $MP3ENCODER returned code $RETURN" >> "${ABCDETEMPDIR}/errors"
                                        else
-                                               for UTRACKNUM in $TRACKQUEUE
+                                               for THISTRACKNUM in $TRACKQUEUE
                                                do
-                                                       run_command "encodetrack-$OUTPUT-$UTRACKNUM" true
+                                                       run_command "encodetrack-$OUTPUT-$THISTRACKNUM" true
                                                done
                                        fi
                                )