* Amine Aouled Hamed <amine....@gmail.com> [15.01.2016 10:03]: > > please make var 'iface' local and while you are there, move > > all the 'local' declaration to the head of the function. > > Wouldn't be better if the local vars inside of the if and for statements > stay inside?
maybe thats personal preference, i like it outside a loop. > I mean what is the point of declaring ifaces if I will be using all the > ifaces? in term of performance(even if it is negligible and clarity of the > code). you are right, performance is not an issue here. i just spotted this in memory if a former double-local-crash-bug in busybox (which is what happens in a for-loop) also: declaring iface 'local' means, that it is thrown away when the functions returns, otherwise it will pollute your env-space. bye, bastian _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel