[SCM] Debian package checker branch, master, updated. 2.3.0-4-g146dd9a
The following commit has been merged in the master branch:
commit 79aad14b053a1b6b638754988ec502b193240edc
Author: Raphael Geissert <atomo64@gmail.com>
Date: Wed Mar 18 12:58:13 2009 -0600
Avoid code duplication in get_dsc_info
read_dpkg_control is already calling _ensure_file_is_sane() and just
checking for the presence of the value to be returned is enough.
diff --git a/lib/Util.pm b/lib/Util.pm
index c8bea34..f8934b9 100644
--- a/lib/Util.pm
+++ b/lib/Util.pm
@@ -174,13 +174,8 @@ sub get_deb_info {
sub get_dsc_info {
my ($file) = @_;
-
- if (not _ensure_file_is_sane($file)) {
- return undef;
- }
-
my @data = read_dpkg_control($file);
- return $data[0];
+ return (defined($data[0])? $data[0] : undef);
}
sub _ensure_file_is_sane {
--
Debian package checker
Reply to: