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

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=f0ad6b73ce9ee905fc860df7f685820ed6b08917

commit f0ad6b73ce9ee905fc860df7f685820ed6b08917
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Aug 29 01:33:14 2019 +0200

    dpkg-deb: Fold two adjacent if conditionals into a single one
    
    Warned-by: cppcheck
---
 debian/changelog   | 1 +
 dpkg-deb/extract.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 3df2553da..261862d4a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -43,6 +43,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
     - libdpkg: Use the variable instead of a type as sizeof() argument.
     - libdpkg: Use the totalwritten variable for a consistency check.
     - dselect: Reduce scope of variable, to avoid it being unused in a branch.
+    - dpkg-deb: Fold two adjacent if conditionals into a single one.
   * Build system:
     - Bump minimal Perl version to 5.24.1.
     - Add a serial versioning to the m4 files.
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index ff31ccc20..605a18440 100644
--- a/dpkg-deb/extract.c
+++ b/dpkg-deb/extract.c
@@ -303,9 +303,10 @@ extracthalf(const char *debar, const char *dir,
   }
   close(p1[0]);
   dpkg_ar_close(ar);
-  if (taroption) close(p2[1]);
 
   if (taroption) {
+    close(p2[1]);
+
     c3 = subproc_fork();
     if (!c3) {
       struct command cmd;

-- 
Dpkg.Org's dpkg

Reply via email to