From: Josef Schlehofer Date: Thu, 6 Aug 2026 10:41:23 +0000 (+0200) Subject: batman-adv: use return instead of continue in the migration script X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=fe1e65bed7e3fd7e9b892724a1f039ade9ce4eb8;p=openwrt-packages.git batman-adv: use return instead of continue in the migration script proto_batadv_to_batadv_hardif() uses continue to skip a section, but there is no loop in the function itself. POSIX leaves continue without an enclosing loop in the current function unspecified; ash walks the dynamic call stack and lands on the loop inside config_foreach, which happens to produce the intended behaviour. Use return, which expresses the intent directly and does not depend on how config_foreach is implemented. Reported-by: openwrt-ai[bot] Signed-off-by: Josef Schlehofer Co-authored-by: Claude Fable 5 --- diff --git a/net/batman-adv/files/etc/uci-defaults/99-migrate-batadv_hardif b/net/batman-adv/files/etc/uci-defaults/99-migrate-batadv_hardif index c74b7f9c6..509374a92 100755 --- a/net/batman-adv/files/etc/uci-defaults/99-migrate-batadv_hardif +++ b/net/batman-adv/files/etc/uci-defaults/99-migrate-batadv_hardif @@ -17,7 +17,7 @@ proto_batadv_to_batadv_hardif() { config_get routing_algo "${section}" routing_algo if [ -z "$mesh" -o "${proto}" != "batadv" ]; then - continue + return fi uci set network."${section}".proto="batadv_hardif"