xbps_find_pkg_in_dict: return NULL if pkgname obj is not there.
--HG-- extra : convert_revision : xtraeme%40gmail.com-20091124030132-m2wgi7p38voah0ol
This commit is contained in:
parent
fe468b2e90
commit
1c2fc20964
@ -230,7 +230,11 @@ xbps_find_pkg_in_dict(prop_dictionary_t dict, const char *key,
|
||||
return NULL;
|
||||
|
||||
while ((obj = prop_object_iterator_next(iter))) {
|
||||
prop_dictionary_get_cstring_nocopy(obj, "pkgname", &dpkgn);
|
||||
if (!prop_dictionary_get_cstring_nocopy(obj,
|
||||
"pkgname", &dpkgn)) {
|
||||
obj = NULL;
|
||||
break;
|
||||
}
|
||||
if (strcmp(dpkgn, pkgname) == 0)
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user