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:
@@ -230,7 +230,11 @@ xbps_find_pkg_in_dict(prop_dictionary_t dict, const char *key,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
while ((obj = prop_object_iterator_next(iter))) {
|
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)
|
if (strcmp(dpkgn, pkgname) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user