diff options
author | Guillem Jover <guillem@debian.org> | 2019-10-02 04:15:24 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-10-30 22:02:48 +0100 |
commit | cdf22e3757608040460329b46db3fad73e159bcd (patch) | |
tree | b273251f4391c41634b0c36bb21a42e44d5c8417 | |
parent | 032da9675c087abab819d0346765b874e8daf685 (diff) | |
download | dpkg-cdf22e3757608040460329b46db3fad73e159bcd.tar.gz |
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
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | src/update.c | 2 |
2 files changed, 2 insertions, 1 deletions
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; |