diff --git a/lib/util.c b/lib/util.c index 9527f4b5ce..7aa9f24917 100644 --- a/lib/util.c +++ b/lib/util.c @@ -56,12 +56,11 @@ xbps_get_pkg_name(const char *pkg) assert(pkg != NULL); - /* Get the required version */ + /* Get package name */ tmp = strrchr(pkg, '-'); assert(tmp != NULL); len = strlen(pkg) - strlen(tmp) + 1; - /* Get package name */ pkgname = malloc(len); memcpy(pkgname, pkg, len - 1); pkgname[len - 1] = '\0';