aboutsummaryrefslogtreecommitdiff
path: root/votify
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2012-02-15 02:05:51 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2012-02-15 02:07:04 +0000
commit05d7af947bdc08ee1faaab5a131d090cb3f738de (patch)
tree0f74809f0d30b9b31f9476613f21d75f31ad12e8 /votify
parentMerge branch 'master' of git+ssh://git.gentoo.org/proj/elections (diff)
downloadelections-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-xvotify7
1 files changed, 4 insertions, 3 deletions
diff --git a/votify b/votify
index 9363962..94c532a 100755
--- a/votify
+++ b/votify
@@ -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