diff --git a/lib/package_metadir.c b/lib/package_metadir.c index e7f2e59c..e6d44a2f 100644 --- a/lib/package_metadir.c +++ b/lib/package_metadir.c @@ -109,12 +109,7 @@ xbps_metadir_get_pkgd(struct xbps_handle *xhp, const char *name) assert(pm); strlcpy(pm->name, name, sizeof(pm->name)); pm->d = d; - - HASH_ADD_KEYPTR(hh, - pkgmetas, - __UNCONST(name), - strlen(__UNCONST(name)), - pm); + HASH_ADD_STR(pkgmetas, name, pm); return d; }