Remove bogus const from rpmfi pre- and posttrans members
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 24 Apr 2008 12:38:45 +0000 (15:38 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 24 Apr 2008 12:38:45 +0000 (15:38 +0300)
- they're always duped, scaremem or not

lib/rpmfi.c
lib/rpmfi_internal.h

index 5905b4d..f5ad8f1 100644 (file)
@@ -1047,10 +1047,10 @@ if (_rpmfi_debug < 0)
 fprintf(stderr, "*** fi %p\t%s[%d]\n", fi, fi->Type, fi->fc);
 
     /* Free pre- and post-transaction script and interpreter strings. */
-    fi->pretrans = _constfree(fi->pretrans);
-    fi->pretransprog = _constfree(fi->pretransprog);
-    fi->posttrans = _constfree(fi->posttrans);
-    fi->posttransprog = _constfree(fi->posttransprog);
+    fi->pretrans = _free(fi->pretrans);
+    fi->pretransprog = _free(fi->pretransprog);
+    fi->posttrans = _free(fi->posttrans);
+    fi->posttransprog = _free(fi->posttransprog);
 
     if (fi->fc > 0) {
        fi->bnl = hfd(fi->bnl, RPM_FORCEFREE_TYPE);
index f3900a0..8890811 100644 (file)
@@ -98,10 +98,10 @@ struct rpmfi_s {
 
     unsigned char * md5s;      /*!< File md5 sums in binary. */
 
-    const char * pretrans;
-    const char * pretransprog;
-    const char * posttrans;
-    const char * posttransprog;
+    char * pretrans;
+    char * pretransprog;
+    char * posttrans;
+    char * posttransprog;
 
     char * fn;                 /*!< File name buffer. */
     size_t fnlen;              /*!< FIle name buffer length. */