From: Michael Adam Date: Mon, 12 Jan 2009 12:04:40 +0000 (+0100) Subject: nss_wrapper.pl: fix "Use of uninitialized value $i in array element" messages X-Git-Tag: samba-4.0.0alpha6~134 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6f53a487b40de03380db3562733621e209342832;p=thirdparty%2Fsamba.git nss_wrapper.pl: fix "Use of uninitialized value $i in array element" messages I just saw this in "make test" after "SMBD OUTPUT:"... Michael --- diff --git a/lib/nss_wrapper/nss_wrapper.pl b/lib/nss_wrapper/nss_wrapper.pl index b1c9be5365b..dbb7f85dc47 100644 --- a/lib/nss_wrapper/nss_wrapper.pl +++ b/lib/nss_wrapper/nss_wrapper.pl @@ -171,7 +171,7 @@ sub passwd_remove_entry($$) { my ($passwd, $eref) = @_; - for(my $i; defined($passwd->{array}[$i]); $i++) { + for (my $i = 0; defined($passwd->{array}[$i]); $i++) { if ($eref == $passwd->{array}[$i]) { $passwd->{array}[$i] = undef; }