[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: Move "binmode" out of SlidingWindow (by using "<:raw")



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 5cbf90e405ef314419b9ec941278019b2c837a37
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Feb 22 12:02:34 2014 +0100

    Move "binmode" out of SlidingWindow (by using "<:raw")
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/cruft.pm              | 2 +-
 checks/files.pm              | 2 +-
 lib/Lintian/SlidingWindow.pm | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/checks/cruft.pm b/checks/cruft.pm
index 83e1340..e93a91e 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -562,7 +562,7 @@ sub license_check {
         return;
     }
 
-    my $sfd = Lintian::SlidingWindow->new('<', $path, sub { $_ = lc($_); });
+    my $sfd = Lintian::SlidingWindow->new('<:raw', $path, sub { $_ = lc($_); });
     my %licenseproblemhash = ();
 
     # we try to read this file in block and use a sliding window
diff --git a/checks/files.pm b/checks/files.pm
index 5c5a60d..a3fda48 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -1832,7 +1832,7 @@ sub detect_privacy_breach {
     }
 
     my $sfd = Lintian::SlidingWindow->new(
-        '<',
+        '<:raw',
         $info->unpacked($file),
         sub { $_=lc($_); });
 
diff --git a/lib/Lintian/SlidingWindow.pm b/lib/Lintian/SlidingWindow.pm
index 23ed886..74925d1 100644
--- a/lib/Lintian/SlidingWindow.pm
+++ b/lib/Lintian/SlidingWindow.pm
@@ -29,7 +29,6 @@ use Lintian::Util qw(strip);
 sub new {
     my ($class, $mode, $file, $blocksub) = @_;
     open(my $handle, $mode, $file);
-    binmode($handle);
 
     my $self = {
         '_handle'      => $handle,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: