Fix uninitialized warning

when shadow.cfg does not exist, parsing should return an
empty hash instead of displaying a warning
This commit is contained in:
Fabian Grünbichler 2016-03-30 12:09:12 +02:00 committed by Dietmar Maurer
parent cca9761a20
commit 8978ab373c

View File

@ -19,6 +19,8 @@ sub parse_shadow_passwd {
my $shadow = {}; my $shadow = {};
return $shadow if !defined($raw);
while ($raw =~ /^\s*(.+?)\s*$/gm) { while ($raw =~ /^\s*(.+?)\s*$/gm) {
my $line = $1; my $line = $1;