diff options
author | Fabian Groffen <grobian@gentoo.org> | 2022-02-12 19:04:10 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2022-02-12 19:04:10 +0100 |
commit | 618db8bdc8f82972815a9f717a4be0df71f0e52c (patch) | |
tree | adc49f91c90ffb5ee868f0cdd15e604c10e42b55 | |
parent | libq/move_file: fix Coverity uninitialised use CID 248870 (diff) | |
download | portage-utils-618db8bdc8f82972815a9f717a4be0df71f0e52c.tar.gz portage-utils-618db8bdc8f82972815a9f717a4be0df71f0e52c.tar.bz2 portage-utils-618db8bdc8f82972815a9f717a4be0df71f0e52c.zip |
qlop: fix Coverity condition always true CID 248869
atom->pfx_op cannot be 2 values at the same time so,
pfx_op != X || pfx_op != Y
has to be always true
fix it to turn into and condition, which makes more sense in the code
flow
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r-- | qlop.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* - * Copyright 2005-2021 Gentoo Foundation + * Copyright 2005-2022 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 * * Copyright 2005-2010 Ned Ludd - <solar@gentoo.org> @@ -1259,7 +1259,7 @@ static int do_emerge_log( continue; } case NEWER: - if (atom->pfx_op != ATOM_OP_NEWER || + if (atom->pfx_op != ATOM_OP_NEWER && atom->pfx_op != ATOM_OP_NEWER_EQUAL) continue; /* fall through */ |