mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
Simplify xbps_find_pkg_in_dict().
--HG-- extra : convert_revision : 345646a40ce381402647c21033d711e77d8ce7a9
This commit is contained in:
parent
edc4a572bb
commit
6542132999
1 changed files with 2 additions and 7 deletions
|
@ -81,19 +81,14 @@ prop_dictionary_t
|
|||
xbps_find_pkg_in_dict(prop_dictionary_t dict, const char *key,
|
||||
const char *pkgname)
|
||||
{
|
||||
prop_array_t array;
|
||||
prop_object_iterator_t iter;
|
||||
prop_object_t obj;
|
||||
const char *dpkgn;
|
||||
|
||||
if (dict == NULL || pkgname == NULL || key == NULL)
|
||||
if (pkgname == NULL)
|
||||
return NULL;
|
||||
|
||||
array = prop_dictionary_get(dict, key);
|
||||
if (array == NULL || prop_object_type(array) != PROP_TYPE_ARRAY)
|
||||
return NULL;
|
||||
|
||||
iter = prop_array_iterator(array);
|
||||
iter = xbps_get_array_iter_from_dict(dict, key);
|
||||
if (iter == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue