aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2008-02-10 14:17:33 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2008-02-10 14:17:33 +0000
commit05b8aac3fb350eee3935ca1538107a8640f4cebb (patch)
treee643f83b996ba4ab637ddadda33c19cbc351608b
parentdbee12dd66d75660b607fe11d582bce7bcbf1965 (diff)
downloadspec-helper-05b8aac3fb350eee3935ca1538107a8640f4cebb.tar
spec-helper-05b8aac3fb350eee3935ca1538107a8640f4cebb.tar.gz
spec-helper-05b8aac3fb350eee3935ca1538107a8640f4cebb.tar.bz2
spec-helper-05b8aac3fb350eee3935ca1538107a8640f4cebb.tar.xz
spec-helper-05b8aac3fb350eee3935ca1538107a8640f4cebb.zip
fix another warning
-rwxr-xr-xfix-eol2
1 files changed, 1 insertions, 1 deletions
diff --git a/fix-eol b/fix-eol
index 9648855..c546fed 100755
--- a/fix-eol
+++ b/fix-eol
@@ -35,7 +35,7 @@ sub convert {
# check if first line has less than 80 characters and ends with \r\n
open(my $in, '<', $_) or die "Unable to open file $_: $!";
my $line = <$in>;
- if (length($line) <= 80 && $line =~ s/\r\n$/\n/) {
+ if (defined $line && length($line) <= 80 && $line =~ s/\r\n$/\n/) {
# process all file
my $out = File::Temp->new(DIR => '.', UNLINK => 0);
print $out $line;