Make headerNVR() just a special case of headerNEVRA()

This commit is contained in:
Panu Matilainen 2008-04-16 10:17:19 +03:00
parent 72b200fe59
commit 9a2b4cba05
1 changed files with 7 additions and 11 deletions

View File

@ -11,6 +11,13 @@
#include "debug.h"
int headerNVR(Header h, const char **np, const char **vp, const char **rp)
{
return headerNEVRA(h, np, NULL, vp, rp, NULL);
}
int headerNEVRA(Header h, const char **np,
int32_t **ep, const char **vp, const char **rp,
const char **ap)
{
rpmTagType type;
rpm_count_t count;
@ -30,17 +37,6 @@ int headerNVR(Header h, const char **np, const char **vp, const char **rp)
&& type == RPM_STRING_TYPE && count == 1))
*rp = NULL;
}
return 0;
}
int headerNEVRA(Header h, const char **np,
int32_t **ep, const char **vp, const char **rp,
const char **ap)
{
rpmTagType type;
rpm_count_t count;
headerNVR(h, np, vp, rp);
if (ap) {
if (!(headerGetEntry(h, RPMTAG_ARCH, &type, (rpm_data_t *) ap, &count)
&& type == RPM_STRING_TYPE && count == 1))