Extend assertions by checking passed in proplib type.

This commit is contained in:
Juan RP
2011-10-19 16:53:38 +02:00
parent a80df68b15
commit 9fb3c38aa2
17 changed files with 55 additions and 31 deletions

View File

@@ -43,6 +43,9 @@ xbps_repository_pkg_replaces(prop_dictionary_t transd,
const char *pattern, *pkgname, *curpkgname;
bool instd_auto = false;
assert(prop_object_type(transd) == PROP_TYPE_DICTIONARY);
assert(prop_object_type(pkg_repod) == PROP_TYPE_DICTIONARY);
replaces = prop_dictionary_get(pkg_repod, "replaces");
if (replaces == NULL || prop_array_count(replaces) == 0)
return 0;