summaryrefslogtreecommitdiff
path: root/dh_md5sums
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2016-05-01 07:28:28 +0000
committerNiels Thykier <niels@thykier.net>2016-05-01 07:43:22 +0000
commite2420e4c81dd303be862a7de4048ed495bd6b316 (patch)
treeed68d0ac9cc5ff6da1d10121bb040a9ead4d06a5 /dh_md5sums
parentc5b14e3e54d7ca74744f55d48ed2a9d3ec9d0244 (diff)
downloaddebhelper-e2420e4c81dd303be862a7de4048ed495bd6b316.tar.gz
dh_*: Prefer 3-arg open
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'dh_md5sums')
-rwxr-xr-xdh_md5sums7
1 files changed, 4 insertions, 3 deletions
diff --git a/dh_md5sums b/dh_md5sums
index b0cf0b63..c720b11c 100755
--- a/dh_md5sums
+++ b/dh_md5sums
@@ -63,13 +63,14 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my $exclude="";
if (! $dh{INCLUDE_CONFFILES} && -r "$tmp/DEBIAN/conffiles") {
# Generate exclude regexp.
- open (CONFF,"$tmp/DEBIAN/conffiles");
- while (<CONFF>) {
+ open(my $fd, '<', "$tmp/DEBIAN/conffiles")
+ or die("open $tmp/DEBIAN/conffiles failed: $!");
+ while (<$fd>) {
chomp;
s/^\///;
$exclude.="! -path \"./$_\" ";
}
- close CONFF;
+ close($fd);
}
# See if we should exclude other files.