diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-03-19 15:33:04 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-03-19 16:28:10 -0700 |
commit | 327ea4113cea590f4d2c33bb430421158ebf51fa (patch) | |
tree | 65766f67177057510a4fc59be66cc8eed4cae8a4 | |
parent | c4e924bb3de01f348816d2854c3e1d9b28ec49d0 (diff) | |
download | vyatta-cfg-327ea4113cea590f4d2c33bb430421158ebf51fa.tar.gz vyatta-cfg-327ea4113cea590f4d2c33bb430421158ebf51fa.zip |
Need explicit return to guarantee returning false
If perl function falls off the end, it will return the
result of the last expression. For these functions, the idea
was to return a false value; and it the return was missing.
-rwxr-xr-x | lib/Vyatta/Misc.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Vyatta/Misc.pm b/lib/Vyatta/Misc.pm index 77c6218..f4f9bfc 100755 --- a/lib/Vyatta/Misc.pm +++ b/lib/Vyatta/Misc.pm @@ -62,7 +62,7 @@ sub is_dhcp_enabled { return 1 if ( $addr && $addr eq "dhcp" ); } - # return undef + return; } # check if any non-dhcp addresses configured @@ -77,7 +77,7 @@ sub is_address_enabled { return 1 if ( $addr && $addr ne 'dhcp' ); } - # return undefined (ie false) + return; } # return dhclient related files for interface @@ -186,7 +186,7 @@ sub getNetAddrIP { return $ip; } - # default return of undefined (ie false) + return; } sub is_ip_v4_or_v6 { @@ -207,7 +207,7 @@ sub is_ip_v4_or_v6 { return 6; } - # default return of undefined (ie false) + return; } sub isIpAddress { @@ -269,7 +269,7 @@ sub isIPinInterfaces { return 1 if ( is_ip_in_list( $ip_addr, getIP($name) ) ); } - # false (undef) + return; # false (undef) } sub isClusteringEnabled { |