summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-11-28 10:21:26 +0200
committerPanu Matilainen <pmatilai@redhat.com>2007-11-28 10:21:26 +0200
commit0728a2d5df68d2f11e44c2d7b05c49a036fdefda (patch)
treedd70f8ac24bf7c14361d52721ac1cd0a24c91970
parent1eb8b83dcaafdf81514ead25a605e8a4a7cd4350 (diff)
downloadlibrpm-tizen-0728a2d5df68d2f11e44c2d7b05c49a036fdefda.tar.gz
librpm-tizen-0728a2d5df68d2f11e44c2d7b05c49a036fdefda.tar.bz2
librpm-tizen-0728a2d5df68d2f11e44c2d7b05c49a036fdefda.zip
Remove code duplication
-rw-r--r--rpmdb/hdrNVR.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/rpmdb/hdrNVR.c b/rpmdb/hdrNVR.c
index 732f0b793..752cd6e78 100644
--- a/rpmdb/hdrNVR.c
+++ b/rpmdb/hdrNVR.c
@@ -36,21 +36,7 @@ int headerNEVRA(Header h, const char **np,
int type;
int count;
- if (np) {
- if (!(headerGetEntry(h, RPMTAG_NAME, &type, (void **) np, &count)
- && type == RPM_STRING_TYPE && count == 1))
- *np = NULL;
- }
- if (vp) {
- if (!(headerGetEntry(h, RPMTAG_VERSION, &type, (void **) vp, &count)
- && type == RPM_STRING_TYPE && count == 1))
- *vp = NULL;
- }
- if (rp) {
- if (!(headerGetEntry(h, RPMTAG_RELEASE, &type, (void **) rp, &count)
- && type == RPM_STRING_TYPE && count == 1))
- *rp = NULL;
- }
+ headerNVR(h, np, vp, rp);
if (ap) {
if (!(headerGetEntry(h, RPMTAG_ARCH, &type, (void **) ap, &count)
&& type == RPM_STRING_TYPE && count == 1))