Sprinkle a couple of assert(3)ions.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user