Sprinkle a couple of assert(3)ions.

This commit is contained in:
Juan RP
2011-01-25 04:14:33 +01:00
parent fd30feadcb
commit 008573e1eb
12 changed files with 46 additions and 0 deletions

View File

@@ -129,6 +129,8 @@ xbps_requiredby_pkg_remove(const char *pkgname)
char *plist;
int rv = 0;
assert(pkgname != NULL);
plist = xbps_xasprintf("%s/%s/%s", xbps_get_rootdir(),
XBPS_META_PATH, XBPS_REGPKGDB);
if (plist == NULL)
@@ -169,6 +171,9 @@ xbps_requiredby_pkg_add(prop_array_t regar, prop_dictionary_t pkg)
char *rdepname;
int rv = 0;
assert(regar != NULL);
assert(pkg != NULL);
prop_dictionary_get_cstring_nocopy(pkg, "pkgver", &pkgver);
rdeps = prop_dictionary_get(pkg, "run_depends");
if (rdeps == NULL || prop_array_count(rdeps) == 0)