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=cdf22e3757608040460329b46db3fad73e159bcd commit cdf22e3757608040460329b46db3fad73e159bcd Author: Guillem Jover <[email protected]> AuthorDate: Wed Oct 2 04:15:24 2019 +0200 dpkg: Remove redudant condition for sourcefile in updateavailable() The preceding “if” already checks exclusively whether this variable is NULL, so in this branch it will always be non-NULL. Warned-by: cppcheck Fixes: knownConditionTrueFalse --- debian/changelog | 1 + src/update.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5991d84b8..f068899fc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -58,6 +58,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium - 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(). + - dpkg: Remove redudant condition for sourcefile in updateavailable(). * Build system: - Bump minimal Perl version to 5.24.1. - Add a serial versioning to the m4 files. diff --git a/src/update.c b/src/update.c index 313f09de9..4a9a95b5b 100644 --- a/src/update.c +++ b/src/update.c @@ -50,7 +50,7 @@ updateavailable(const char *const *argv) case act_avreplace: case act_avmerge: if (sourcefile == NULL) sourcefile = "-"; - else if (sourcefile && argv[1]) + else if (argv[1]) badusage(_("--%s takes at most one Packages-file argument"), cipaction->olong); break; -- Dpkg.Org's dpkg

