From 032da9675c087abab819d0346765b874e8daf685 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 2 Oct 2019 04:13:19 +0200 Subject: 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"); -- cgit v1.2.3