lib/plist_find.c: do not return a false positive while matching vpkgs.
This commit is contained in:
@@ -190,6 +190,7 @@ vpkg_user_conf(struct xbps_handle *xhp,
|
|||||||
xbps_string_t rpkg;
|
xbps_string_t rpkg;
|
||||||
const char *vpkgver, *pkg = NULL;
|
const char *vpkgver, *pkg = NULL;
|
||||||
char *vpkgname = NULL, *tmp;
|
char *vpkgname = NULL, *tmp;
|
||||||
|
bool found = false;
|
||||||
|
|
||||||
if (xhp->vpkgd == NULL)
|
if (xhp->vpkgd == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -226,11 +227,12 @@ vpkg_user_conf(struct xbps_handle *xhp,
|
|||||||
xbps_dbg_printf(xhp, "matched vpkg `%s' with `%s (provides %s)`\n",
|
xbps_dbg_printf(xhp, "matched vpkg `%s' with `%s (provides %s)`\n",
|
||||||
vpkg, pkg, vpkgver);
|
vpkg, pkg, vpkgver);
|
||||||
free(vpkgname);
|
free(vpkgname);
|
||||||
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
xbps_object_iterator_release(iter);
|
xbps_object_iterator_release(iter);
|
||||||
|
|
||||||
return pkg;
|
return found ? pkg : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
xbps_dictionary_t
|
xbps_dictionary_t
|
||||||
|
Reference in New Issue
Block a user