]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests: mptcp: join: avoid declaring i if not used
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Tue, 3 Feb 2026 18:41:29 +0000 (19:41 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Feb 2026 02:45:34 +0000 (18:45 -0800)
A few loops were declaring 'i', but this variable was not used.

To avoid confusions, use '_' instead: it is more explicit to mark that
this variable is not needed.

Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260203-net-next-mptcp-misc-feat-6-20-v1-13-31ec8bfc56d1@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_join.sh

index a8b9782a85df828f9488d3620f09c7314786858a..0f9253d607c3ce29c2412301122ebb3fc6201857 100755 (executable)
@@ -603,8 +603,7 @@ wait_rm_addr()
        local old_cnt="${2}"
        local cnt
 
-       local i
-       for i in $(seq 10); do
+       for _ in $(seq 10); do
                cnt=$(rm_addr_count ${ns})
                [ "$cnt" = "${old_cnt}" ] || break
                sleep 0.1
@@ -623,8 +622,7 @@ wait_rm_sf()
        local old_cnt="${2}"
        local cnt
 
-       local i
-       for i in $(seq 10); do
+       for _ in $(seq 10); do
                cnt=$(rm_sf_count ${ns})
                [ "$cnt" = "${old_cnt}" ] || break
                sleep 0.1
@@ -648,8 +646,7 @@ wait_ll_ready()
 {
        local ns="${1}"
 
-       local i
-       for i in $(seq 50); do
+       for _ in $(seq 50); do
                ip -n "${ns}" -6 addr show scope link | grep "inet6 fe80" |
                        grep -qw "tentative" || break
                sleep 0.1