xbps-checkvers: add some assertions.

This commit is contained in:
Juan RP 2015-12-21 16:51:24 +01:00
parent efbd329122
commit a00c7b1c4b

View File

@ -587,6 +587,10 @@ rcv_check_version(rcv_t *rcv)
revision = map_find(rcv->env, "revision");
reverts = map_find(rcv->env, "reverts");
assert(pkgname.v.s);
assert(version.v.s);
assert(revision.v.s);
srcver = strncpy(srcver, pkgname.v.s, pkgname.v.len);
if (rcv->installed)
rcv->pkgd = xbps_pkgdb_get_pkg(&rcv->xhp, srcver);