From 4d4d7294f82720d3915622d3afb7f4e1b62fcc07 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 29 Feb 2008 01:20:24 +0000 Subject: simplify --- lib/network/connection/wireless.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm index 34db543..0608847 100644 --- a/lib/network/connection/wireless.pm +++ b/lib/network/connection/wireless.pm @@ -948,14 +948,14 @@ sub wpa_supplicant_add_eap_network { $mykey = join('_', "eap", $myone); if (!defined $ui_input->{$mykey}) { #Only if it is defined and not empty - $network->{$myone} = $default_eap_cfg->{$myone} if defined $default_eap_cfg->{$myone} && $default_eap_cfg->{$myone} ne ""; + $network->{$myone} = $default_eap_cfg->{$myone} if $default_eap_cfg->{$myone}; } elsif ($ui_input->{$mykey} =~ /auto detect/i) { #Only if it is defined and not empty - $network->{$myone} = $default_eap_cfg->{$myone} if defined $default_eap_cfg->{$myone} && $default_eap_cfg->{$myone} ne ""; + $network->{$myone} = $default_eap_cfg->{$myone} if $default_eap_cfg->{$myone}; } else { #Handle also quoting #Do not define if blank, the save routine will delete entry from file - next if $ui_input->{$mykey} eq ""; + next if !$ui_input->{$mykey}; $network->{$myone} = $myeap_vars->{$myone} == 2 ? qq("$ui_input->{$mykey}") : $ui_input->{$mykey}; } } -- cgit v1.2.1