diff options
author | Christian Ruppert <idl0r@gentoo.org> | 2012-02-15 02:05:51 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2012-02-15 02:07:04 +0000 |
commit | 05d7af947bdc08ee1faaab5a131d090cb3f738de (patch) | |
tree | 0f74809f0d30b9b31f9476613f21d75f31ad12e8 /votify | |
parent | Merge branch 'master' of git+ssh://git.gentoo.org/proj/elections (diff) | |
download | elections-05d7af947bdc08ee1faaab5a131d090cb3f738de.tar.gz elections-05d7af947bdc08ee1faaab5a131d090cb3f738de.tar.bz2 elections-05d7af947bdc08ee1faaab5a131d090cb3f738de.zip |
Fix some uninitialized variables warnings
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'votify')
-rwxr-xr-x | votify | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -26,11 +26,12 @@ my (%opt); sub grabfile_int { my $f = shift; + my $i = 0; open FILE, "<", $f; - my $i = <FILE>; + $i = <FILE> if defined(<FILE>); close FILE; - chomp $i; - return $i + 0; + chomp $i if $i; + return $i; } # Collect the open elections |