[Reproducible-commits] [strip-nondeterminism] 01/05: Standardise on $modified over $changed.

Chris Lamb chris at chris-lamb.co.uk
Sun Jul 24 11:41:10 UTC 2016


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

lamby pushed a commit to branch master
in repository strip-nondeterminism.

commit 30291aca2a10f6f4ed3662a9ff23b18e97dc1a50
Author: Chris Lamb <lamby at debian.org>
Date:   Sun Jul 24 10:53:08 2016 +0100

    Standardise on $modified over $changed.
---
 lib/File/StripNondeterminism/handlers/gettext.pm | 8 ++++----
 lib/File/StripNondeterminism/handlers/png.pm     | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/File/StripNondeterminism/handlers/gettext.pm b/lib/File/StripNondeterminism/handlers/gettext.pm
index 82a2a56..49bf802 100644
--- a/lib/File/StripNondeterminism/handlers/gettext.pm
+++ b/lib/File/StripNondeterminism/handlers/gettext.pm
@@ -61,7 +61,7 @@ sub normalize {
 	my $minor = int($revision % 256);
 	return 0 if $major > 1;
 
-	my $changed = 0;
+	my $modified = 0;
 	for (my $i=0; $i < $nstrings; $i++) {
 		my $len = unpack($fmt, substr($buf, $orig_to + $i*8, 4));
 		next if $len > 0;
@@ -85,17 +85,17 @@ sub normalize {
 		next if length($trans_msg) != $trans_len;
 
 		$buf = substr($buf, 0, $trans_offset) . $trans_msg . substr($buf, $trans_offset + $trans_len);
-		$changed = 1;
+		$modified = 1;
 	}
 
-	if ($changed) {
+	if ($modified) {
 		open(my $fh, '>', $mo_filename) or die "Can't open file $mo_filename for writing: $!";
 		binmode($fh);
 		print $fh $buf;
 		close($fh);
 	}
 
-	return $changed;
+	return $modified;
 }
 
 1;
diff --git a/lib/File/StripNondeterminism/handlers/png.pm b/lib/File/StripNondeterminism/handlers/png.pm
index a76e304..1a8212c 100644
--- a/lib/File/StripNondeterminism/handlers/png.pm
+++ b/lib/File/StripNondeterminism/handlers/png.pm
@@ -72,7 +72,7 @@ sub _normalize {
 	my $canonical_time = $File::StripNondeterminism::canonical_time;
 
 	my $buf;
-	my $changed;
+	my $modified;
 	my $bytes_read;
 
 	read($fh, my $magic, 8); $magic eq "\x89PNG\r\n\x1a\n"
@@ -99,12 +99,12 @@ sub _normalize {
 
 			if ($type eq "tIME") {
 				print $tempfile time_chunk($canonical_time) if defined($canonical_time);
-				$changed = 1;
+				$modified = 1;
 				next;
 			} elsif (($type =~ /[tiz]EXt/) && ($data =~ /^(date:[^\0]+|Creation Time)\0/)) {
 				print $tempfile text_chunk($1, strftime("%Y-%m-%dT%H:%M:%S-00:00",
 								gmtime($canonical_time))) if defined($canonical_time);
-				$changed = 1;
+				$modified = 1;
 				next;
 			}
 		}
@@ -139,7 +139,7 @@ sub _normalize {
 	}
 	defined($bytes_read) or die "$filename: read failed: $!";
 
-	return $changed;
+	return $modified;
 }
 
 1;

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



More information about the Reproducible-commits mailing list