From 0abf36fd4d042c1ee93aa0bdd23b96999952868b Mon Sep 17 00:00:00 2001 From: jbj Date: Sun, 11 Nov 2001 00:11:33 +0000 Subject: Rip alGetHeader() out of depends.c. CVS patchset: 5169 CVS date: 2001/11/11 00:11:33 --- lib/rpmlibprov.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) (limited to 'lib/rpmlibprov.c') diff --git a/lib/rpmlibprov.c b/lib/rpmlibprov.c index a6460872a..3ef8bf41c 100644 --- a/lib/rpmlibprov.c +++ b/lib/rpmlibprov.c @@ -11,13 +11,16 @@ #include "debug.h" -/*@access rpmDepSet@*/ - +/** + */ struct rpmlibProvides_s { -/*@observer@*/ /*@null@*/ const char * featureName; -/*@observer@*/ /*@null@*/ const char * featureEVR; +/*@observer@*/ /*@null@*/ + const char * featureName; +/*@observer@*/ /*@null@*/ + const char * featureEVR; int featureFlags; -/*@observer@*/ /*@null@*/ const char * featureDescription; +/*@observer@*/ /*@null@*/ + const char * featureDescription; }; /*@observer@*/ /*@unchecked@*/ @@ -64,22 +67,14 @@ int rpmCheckRpmlibProvides(const rpmDepSet key) { const struct rpmlibProvides_s * rlp; int rc = 0; - rpmDepSet pro = memset(alloca(sizeof(*pro)), 0, sizeof(*pro)); - pro->Type = "Provides"; - pro->tagN = RPMTAG_PROVIDENAME; for (rlp = rpmlibProvides; rlp->featureName != NULL; rlp++) { if (rlp->featureEVR && rlp->featureFlags) { - /*@-immediatetrans@*/ - pro->DNEVR = NULL; - pro->N = (const char **) &rlp->featureName; - pro->EVR = (const char **) &rlp->featureEVR; - pro->Flags = &rlp->featureFlags; - /*@=immediatetrans@*/ - pro->Count = 1; - (void) dsiNext(dsiInit(pro)); + rpmDepSet pro; + pro = dsSingle(RPMTAG_PROVIDENAME, rlp->featureName, + rlp->featureEVR, rlp->featureFlags); rc = dsCompare(pro, key); - pro->DNEVR = _free(pro->DNEVR); + pro = dsFree(pro); } if (rc) break; -- cgit v1.2.3