svn commit: r196550 - in head: etc/defaults etc/rc.d share/man/man5

Doug Barton dougb at FreeBSD.org
Tue Aug 25 19:26:31 UTC 2009


My sincere apologies for missing this the first N times I reviewed it,
but both variables in functions should be declared local. Attached is
a suggested patch.


Doug

-- 

    This .signature sanitized for your protection

-------------- next part --------------
Index: static_arp
===================================================================
--- static_arp	(revision 196550)
+++ static_arp	(working copy)
@@ -41,10 +41,11 @@
 
 static_arp_start()
 {
+	local e arp_args
+
 	if [ -n "${static_arp_pairs}" ]; then
 		echo -n 'Binding static ARP pair(s):'
 		for e in ${static_arp_pairs}; do
-			local arp_args
 			echo -n " ${e}"
 			eval arp_args=\$static_arp_${e}
 			arp -S ${arp_args} >/dev/null 2>&1
@@ -55,10 +56,11 @@
 
 static_arp_stop()
 {
+	local e arp_args
+
 	if [ -n "${static_arp_pairs}" ]; then
 		echo -n 'Unbinding static ARP pair(s):'
 		for e in ${static_arp_pairs}; do
-			local arp_args
 			echo -n " ${e}"
 			eval arp_args=\$static_arp_${e}
 			arp -d ${arp_args%%[ 	]*} > /dev/null 2>&1


More information about the svn-src-head mailing list