RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: rpm                              Date:   12-Oct-2007 22:34:10
  Branch: HEAD                             Handle: 2007101221340901

  Modified files:
    rpm                     CHANGES
    rpm/rpmdb               rpmdb.c

  Log:
    - jbj: rpmdb.c: retrofit HE_s.

  Summary:
    Revision    Changes     Path
    1.1679      +2  -1      rpm/CHANGES
    1.176       +10 -26     rpm/rpmdb/rpmdb.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1678 -r1.1679 CHANGES
  --- rpm/CHANGES       12 Oct 2007 20:23:03 -0000      1.1678
  +++ rpm/CHANGES       12 Oct 2007 20:34:09 -0000      1.1679
  @@ -1,5 +1,6 @@
   4.5 -> 5.0:
  -    - jbj: addTE: use headerGetExtension.
  +    - jbj: rpmdb.c: retrofit HE_s.
  +    - jbj: rpmte.c: use headerGetExtension.
       - jbj: add HE_s typedef to get rid of alloca baggage.
       - bero: Make rpm2cpio work for packages with payloads other than gzip
       - jbj: change to hRET_t for existing headerGetExtension uses.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmdb.c
  ============================================================================
  $ cvs diff -u -r1.175 -r1.176 rpmdb.c
  --- rpm/rpmdb/rpmdb.c 12 Oct 2007 18:55:58 -0000      1.175
  +++ rpm/rpmdb/rpmdb.c 12 Oct 2007 20:34:10 -0000      1.176
  @@ -2134,13 +2134,11 @@
        /[EMAIL PROTECTED] mi->mi_re @*/
   {
       HGE_t hge = (HGE_t) headerGetExtension;
  -#ifdef       DYING
  -    HFD_t hfd = (HFD_t) headerFreeData;
  -#endif
  -    HE_t he;
  -    int_32 he_t;
  +    int_32 he_t = 0;
       hRET_t he_p = { .ptr = NULL };
  -    int_32 he_c;
  +    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;
       char numbuf[32];
       miRE mire;
       int ntags = 0;
  @@ -2158,12 +2156,6 @@
       if ((mire = mi->mi_re) == NULL)
        return 0;
   
  -    he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
  -    memset(&he_p, 0, sizeof(he_p));
  -    he->t = &he_t;
  -    he->p = &he_p;
  -    he->c = &he_c;
  -
       for (i = 0; i < mi->mi_nre; i++, mire++) {
        int anymatch;
   
  @@ -2817,15 +2809,11 @@
   /[EMAIL PROTECTED] -nullptrarith -nullderef @*/ /* FIX: rpmvals heartburn */
       {        dbiIndexItem rec = dbiIndexNewItem(hdrNum, 0);
        int dbix;
  -     HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
  -     int_32 he_t;
  +     int_32 he_t = 0;
        hRET_t he_p = { .ptr = NULL };
  -     int_32 he_c;
  -
  -     memset(&he_p, 0, sizeof(he_p));
  -     he->t = &he_t;
  -     he->p = &he_p;
  -     he->c = &he_c;
  +     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;
   
        if (db->db_tagn != NULL)
        for (dbix = 0; dbix < db->db_ndbi; dbix++) {
  @@ -3215,15 +3203,11 @@
   
       if (hdrNum)
       {        dbiIndexItem rec = dbiIndexNewItem(hdrNum, 0);
  -     HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
        int_32 he_t;
        hRET_t he_p = { .ptr = NULL };
        int_32 he_c;
  -
  -     memset(&he_p, 0, sizeof(he_p));
  -     he->t = &he_t;
  -     he->p = &he_p;
  -     he->c = &he_c;
  +     HE_s he_s = { .tag = 0, .t = &he_t, .p = &he_p, .c = &he_c, .freeData = 
0 };
  +     HE_t he = &he_s;
   
        /* Save the header instance. */
        (void) headerSetInstance(h, hdrNum);
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to