mirror of
https://github.com/openwrt/packages.git
synced 2026-12-06 02:15:29 +04:00
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 <pepe.schlehofer@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8113f46474
commit
fe1e65bed7
1 file changed
+1
-1
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user