diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-05-06 14:54:10 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-05-06 14:54:10 +0300 |
commit | 5b91b31cc98de7750a9b688c38a9e7bae0e1f58e (patch) | |
tree | 8b89f95f21fd1eb62c6ed5ca5c5fc6c3164ddb35 /lib/rpmds.c | |
parent | 2ce7b56e621b097b76a2e5059def7d0e5a64d53b (diff) | |
download | librpm-tizen-5b91b31cc98de7750a9b688c38a9e7bae0e1f58e.tar.gz librpm-tizen-5b91b31cc98de7750a9b688c38a9e7bae0e1f58e.tar.bz2 librpm-tizen-5b91b31cc98de7750a9b688c38a9e7bae0e1f58e.zip |
rpmdsThis() is really just a special case of rpmdsSingle()
Diffstat (limited to 'lib/rpmds.c')
-rw-r--r-- | lib/rpmds.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/lib/rpmds.c b/lib/rpmds.c index db8c9c21c..6ae5c9fd6 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -228,37 +228,14 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds) rpmds rpmdsThis(Header h, rpmTag tagN, rpmsenseFlags Flags) { - rpmds ds = NULL; - const char * Type; + rpmds ds; const char * n; char *evr; - if (dsType(tagN, &Type, NULL, NULL)) - goto exit; - evr = headerGetEVR(h, &n); - - ds = xcalloc(1, sizeof(*ds)); - ds->Type = Type; - ds->tagN = tagN; - ds->Count = 1; - ds->nopromote = _rpmds_nopromote; - ds->N = rpmdsDupArgv(&n, 1); - ds->EVR = rpmdsDupArgv((const char **)&evr, 1); + ds = rpmdsSingle(tagN, n, evr, Flags); free(evr); - - ds->Flags = xmalloc(sizeof(*ds->Flags)); ds->Flags[0] = Flags; - ds->i = 0; - { char pre[2]; - pre[0] = ds->Type[0]; - pre[1] = '\0'; - /* LCL: ds->Type may be NULL ??? */ - ds->DNEVR = rpmdsNewDNEVR(pre, ds); - } - - -exit: - return rpmdsLink(ds, (ds ? ds->Type : RPMDBG())); + return ds; } rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, rpmsenseFlags Flags) |