summaryrefslogtreecommitdiff
path: root/lib/rpmlibprov.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-11-11 00:11:33 +0000
committerjbj <devnull@localhost>2001-11-11 00:11:33 +0000
commit0abf36fd4d042c1ee93aa0bdd23b96999952868b (patch)
tree8a3ba209f6a2a9be1c24849096bdc0c7691cc636 /lib/rpmlibprov.c
parenta086ad7dd1cb93321faa1b863622123edd2287b3 (diff)
downloadlibrpm-tizen-0abf36fd4d042c1ee93aa0bdd23b96999952868b.tar.gz
librpm-tizen-0abf36fd4d042c1ee93aa0bdd23b96999952868b.tar.bz2
librpm-tizen-0abf36fd4d042c1ee93aa0bdd23b96999952868b.zip
Rip alGetHeader() out of depends.c.
CVS patchset: 5169 CVS date: 2001/11/11 00:11:33
Diffstat (limited to 'lib/rpmlibprov.c')
-rw-r--r--lib/rpmlibprov.c29
1 files changed, 12 insertions, 17 deletions
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;