From 2fcbc894025a413a8007493eaa6a602dfb4c1980 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 23 Jan 2003 19:23:52 +0000 Subject: pixelification --- perl-install/network/network.pm | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 35a4bad85..31944f2d9 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -334,20 +334,10 @@ notation (for example, 1.2.3.4)."); } return 0 if $auto_ip; - my $bad_ip = 0; - each_index { unless (is_ip($intf->{$_})) { + if (my @bad = map_index { if_(is_ip($intf->{$_}), $::i) } @fields) { $in->ask_warn('', N("IP address should be in format 1.2.3.4")); - $bad_ip = 1; - } } @fields; - return 1 if $bad_ip; - - #for (my $i = 0; $i < @fields; $i++) { - # unless (is_ip($intf->{$fields[$i]})) { - # $in->ask_warn('', N("IP address should be in format 1.2.3.4")); - # return (1); - # } - # return 0; - #} + return 1, $bad[0]; + } return 0 if !$intf->{WIRELESS_FREQ}; if ($intf->{WIRELESS_FREQ} !~ /[0-9.]*[kGM]/) { -- cgit v1.2.1