threads / patch / 6475

patch, 3 partsCleanup uninitialized value in chomp

Subject: [RESEND PATCH 3/3] Cleanup uninitialized value in chomp

## tl;dr

One message between Jan 22, 2007 and Jan 22, 2007. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Alex Riesen· Jan 22, 2007, 17:13 UTC · lore

which happens if you use ActiveState Perl and a pipe workaround specially for it.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 perl/Git.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
From d8fbca783d727aff0c7078330b7ec3d0894e9093 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Mon, 22 Jan 2007 15:58:03 +0100
Subject: [PATCH 3/3] Cleanup uninitialized value in chomp

which happens if you use ActiveState Perl and a pipe workaround specially for it.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 perl/Git.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to perl/Git.pm +1 −1
diff --git a/perl/Git.pm b/perl/Git.pm
index 2f6b59a..c1729ba 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -275,7 +275,7 @@ sub command {
 
 	} else {
 		my @lines = <$fh>;
-		chomp @lines;
+		defined and chomp for @lines;
 		try {
 			_cmd_close($fh, $ctx);
 		} catch Git::Error::Command with {
-- 
1.5.0.rc2.g3f1a

← back to recent threads