From ee9bb3ca918c9e531857116c8eff9f0b94418bb0 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 20 May 2007 23:53:24 +0000 Subject: [PATCH] Remove an unused variable in dpkg-statoverride by renaming it to the initially indented name. Closes: #425041 --- ChangeLog | 6 ++++++ debian/changelog | 4 +++- scripts/dpkg-statoverride.pl | 11 ++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56f2196e..ad80e52e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-05-21 Guillem Jover + + * scripts/dpkg-statoverride.pl ($pat): Rename to ... + ($pattern): ... this. Fixes $pattern being an unused variable. + ($file): Move the declaration to its first usage in the for loop. + 2007-05-15 Guillem Jover * configure.ac: Bump version to 1.14.4~. diff --git a/debian/changelog b/debian/changelog index b8c27ce1..5e6d4f33 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ dpkg (1.14.4) UNRELEASED; urgency=low - * + [ Guillem Jover ] + * Remove an unused variable in dpkg-statoverride by renaming it to the + initially indented name. Closes: #425041 -- Guillem Jover Tue, 15 May 2007 16:35:25 +0300 diff --git a/scripts/dpkg-statoverride.pl b/scripts/dpkg-statoverride.pl index 405a86ff..5ee877e9 100755 --- a/scripts/dpkg-statoverride.pl +++ b/scripts/dpkg-statoverride.pl @@ -167,8 +167,8 @@ if ($mode eq "add") { $dowrite=1; print(STDERR _g("warning: --update is useless for --remove")."\n") if ($doupdate); } elsif ($mode eq "list") { - my (@list,@ilist,$pattern,$file); - + my (@list, @ilist); + @ilist= @ARGV ? @ARGV : ('*'); while (defined($_=shift(@ilist))) { s/\W/\\$&/g; @@ -177,10 +177,11 @@ if ($mode eq "add") { s,/+$,, && print STDERR _g("stripping trailing /")."\n"; push(@list,"^$_\$"); } - my $pat = join('|', @list); + + my $pattern = join('|', @list); $exitcode=1; - for $file (keys %owner) { - next unless ($file =~ m/$pat/o); + for my $file (keys %owner) { + next unless ($file =~ m/$pattern/o); $exitcode=0; print "$owner{$file} $group{$file} $mode{$file} $file\n"; } -- 2.39.5