RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 14-Oct-2007 19:22:19
Branch: HEAD Handle: 2007101418221900
Modified files:
rpm CHANGES
rpm/lib transaction.c
Log:
- transaction.c: eliminate hge warning.
Summary:
Revision Changes Path
1.1699 +1 -0 rpm/CHANGES
1.341 +11 -4 rpm/lib/transaction.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1698 -r1.1699 CHANGES
--- rpm/CHANGES 14 Oct 2007 17:15:38 -0000 1.1698
+++ rpm/CHANGES 14 Oct 2007 17:22:19 -0000 1.1699
@@ -1,4 +1,5 @@
4.5 -> 5.0:
+ - jbj: transaction.c: eliminate hge warning.
- jbj: rpmds.c: eliminate hge warning.
- jbj: psm.c: eliminate a warning, simplify hge usage.
- jbj: package.c: use headerGetExtension everywhere (fix double free).
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/transaction.c
============================================================================
$ cvs diff -u -r1.340 -r1.341 transaction.c
--- rpm/lib/transaction.c 14 Oct 2007 00:36:22 -0000 1.340
+++ rpm/lib/transaction.c 14 Oct 2007 17:22:19 -0000 1.341
@@ -250,9 +250,14 @@
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies ts, fi, rpmGlobalMacroContext, fileSystem, internalState @*/
{
- HGE_t hge = fi->hge;
+ HGE_t hge = (HGE_t)headerGetExtension;
+ int_32 he_t = 0;
+ hRET_t he_p = { .ptr = NULL };
+ int_32 he_c = 0;
+ HE_s he_s = { .tag = 0, .t = &he_t, .p = &he_p, .c = &he_c, .freeData = 0 };
+ HE_t he = &he_s;
Header h;
- const char * otherStates;
+ const unsigned char * otherStates;
int i, xx;
rpmdbMatchIterator mi;
@@ -265,7 +270,9 @@
return 1;
}
- xx = hge(h, RPMTAG_FILESTATES, NULL, &otherStates, NULL);
+ he->tag = RPMTAG_FILESTATES;
+ xx = hge(h, he->tag, he->t, he->p, he->c);
+ otherStates = he_p.ptr;
/* XXX there's an obscure segfault here w/o NULL check ... */
if (otherStates != NULL)
@@ -279,7 +286,7 @@
fi->actions[fileNum] = FA_SKIP;
}
-
+ he_p.ptr = _free(he_p.ptr);
mi = rpmdbFreeIterator(mi);
return 0;
@@ .
Received on Sun Oct 14 19:22:19 2007