diff options
author | 2019-06-19 12:43:09 +0200 | |
---|---|---|
committer | 2019-06-19 12:43:09 +0200 | |
commit | 1089b8baedcd1d6d7aa41e8f5f81938660079e01 (patch) | |
tree | 1ca046aa8094fa2175985bdf0d121d19de2aa72b /qpkg.c | |
parent | TODO: drop implemented items (diff) | |
download | portage-utils-1089b8baedcd1d6d7aa41e8f5f81938660079e01.tar.gz portage-utils-1089b8baedcd1d6d7aa41e8f5f81938660079e01.tar.bz2 portage-utils-1089b8baedcd1d6d7aa41e8f5f81938660079e01.zip |
libq/set: drop rmspace for all inputsv0.80_pre20190620
Most of the times, rmspace is unnecessary, and doing so, requires a
mutable copy of the data. If the callers call rmspace when necessary,
set can be a bit more efficient.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qpkg.c')
-rw-r--r-- | qpkg.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -127,14 +127,12 @@ static int qpkg_cb(tree_pkg_ctx *pkg_ctx, void *priv) { set *vdb = (set *)priv; - depend_atom *atom; char buf[_Q_PATH_MAX]; - snprintf(buf, sizeof(buf), "%s/%s", pkg_ctx->cat_ctx->name, pkg_ctx->name); - atom = atom_explode(buf); - if (atom == NULL) + if (tree_get_atom(pkg_ctx, false) == NULL) return 0; + snprintf(buf, sizeof(buf), "%s/%s", pkg_ctx->cat_ctx->name, pkg_ctx->name); vdb = add_set(buf, vdb); return 1; |