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=032da9675c087abab819d0346765b874e8daf685

commit 032da9675c087abab819d0346765b874e8daf685
Author: Guillem Jover <[email protected]>
AuthorDate: Wed Oct 2 04:13:19 2019 +0200

    libdpkg: Use p instead of name in dpkg_arch_name_is_illegal()
    
    We assign name to p, which we operate on everywhere in this function
    except for the first check which we still perform on name. This confuses
    at least cppcheck, and it's in any case inconsistent.
    
    Warned-by: cppcheck
    Fixes: nullPointerRedundantCheck
---
 debian/changelog | 1 +
 lib/dpkg/arch.c  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 07ce962c9..5991d84b8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -57,6 +57,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
     - libdpkg: Add new C locale switch over support.
     - libdpkg: Add new versiondescribe_c() to force a C locale.
     - dselect: Make baselist::draw_column_*() col arguments const.
+    - libdpkg: Use p instead of name in dpkg_arch_name_is_illegal().
   * Build system:
     - Bump minimal Perl version to 5.24.1.
     - Add a serial versioning to the m4 files.
diff --git a/lib/dpkg/arch.c b/lib/dpkg/arch.c
index 83c6579f1..96f261704 100644
--- a/lib/dpkg/arch.c
+++ b/lib/dpkg/arch.c
@@ -58,7 +58,7 @@ dpkg_arch_name_is_illegal(const char *name)
        static char buf[150];
        const char *p = name;
 
-       if (name == NULL)
+       if (p == NULL)
                internerr("arch name argument is NULL");
        if (!*p)
                return _("may not be empty string");

-- 
Dpkg.Org's dpkg

Reply via email to