aboutsummaryrefslogtreecommitdiff
path: root/quse.c
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-01-06 09:02:31 +0100
committerFabian Groffen <grobian@gentoo.org>2020-01-06 09:02:31 +0100
commit0e6d9d14f58fc388b4dca9ce19845f69a553b957 (patch)
tree1b68415d21f05b39dd233b107ea8369ff5a8790b /quse.c
parentqcheck/quse: address Coverity concerns (diff)
downloadportage-utils-0e6d9d14f58fc388b4dca9ce19845f69a553b957.tar.gz
portage-utils-0e6d9d14f58fc388b4dca9ce19845f69a553b957.tar.bz2
portage-utils-0e6d9d14f58fc388b4dca9ce19845f69a553b957.zip
quse: fix new Coverity complaints
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'quse.c')
-rw-r--r--quse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/quse.c b/quse.c
index dca2f1c3..4a8b89bd 100644
--- a/quse.c
+++ b/quse.c
@@ -432,7 +432,7 @@ quse_results_cb(tree_pkg_ctx *pkg_ctx, void *priv)
}
if (!state->do_licence) {
- if ((q = tree_pkg_meta_get(pkg_ctx, IUSE)) == NULL)
+ if ((s = tree_pkg_meta_get(pkg_ctx, IUSE)) == NULL)
return 0;
if (state->do_describe) {
@@ -454,14 +454,14 @@ quse_results_cb(tree_pkg_ctx *pkg_ctx, void *priv)
use = add_set(p, use);
}
} else {
- if ((q = tree_pkg_meta_get(pkg_ctx, LICENSE)) == NULL)
+ if ((s = tree_pkg_meta_get(pkg_ctx, LICENSE)) == NULL)
return 0;
}
maxlen = 0;
cnt = 0;
match = false;
- p = q; /* set to IUSE or LICENSE above */
+ p = q = s; /* set to IUSE or LICENSE above */
buf[0] = '\0';
v = buf;
w = buf + sizeof(buf);
@@ -631,7 +631,7 @@ quse_results_cb(tree_pkg_ctx *pkg_ctx, void *priv)
if (use != NULL)
free_set(use);
- if (state->do_describe)
+ if (state->do_describe && !state->do_licence)
close(portdirfd);
return EXIT_SUCCESS;