Remove bogus const from rpmRelocation struct
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 24 Mar 2008 20:42:34 +0000 (22:42 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 24 Mar 2008 20:42:34 +0000 (22:42 +0200)
lib/rpmcli.h
lib/rpmfi.h
lib/rpminstall.c
lib/rpmte.c
rpmqv.c

index a9802f4..cd60d07 100644 (file)
@@ -426,7 +426,7 @@ struct rpmInstallArguments_s {
     int noDeps;
     int incldocs;
     rpmRelocation * relocations;
-    const char * prefix;
+    char * prefix;
     const char * rootdir;
 };
 
index aba449f..6c6abea 100644 (file)
@@ -91,8 +91,8 @@ typedef enum rpmFileAction_e {
  * We pass these around as an array with a sentinel.
  */
 struct rpmRelocation_s {
-    const char * oldPath;      /*!< NULL here evals to RPMTAG_DEFAULTPREFIX, */
-    const char * newPath;      /*!< NULL means to omit the file completely! */
+    char * oldPath;    /*!< NULL here evals to RPMTAG_DEFAULTPREFIX, */
+    char * newPath;    /*!< NULL means to omit the file completely! */
 };
 
 /** \ingroup rpmfi
index d192b82..fb249fa 100644 (file)
@@ -489,7 +489,7 @@ if (fileURL[0] == '=') {
        /* XXX reference held by transaction set */
        eiu->h = headerFree(eiu->h);
        if (eiu->relocations)
-           eiu->relocations->oldPath = _constfree(eiu->relocations->oldPath);
+           eiu->relocations->oldPath = _free(eiu->relocations->oldPath);
 
        switch(rc) {
        case 0:
index 94113ef..96468e5 100644 (file)
@@ -36,8 +36,8 @@ static void delTE(rpmte p)
 
     if (p->relocs) {
        for (r = p->relocs; (r->oldPath || r->newPath); r++) {
-           r->oldPath = _constfree(r->oldPath);
-           r->newPath = _constfree(r->newPath);
+           r->oldPath = _free(r->oldPath);
+           r->newPath = _free(r->newPath);
        }
        p->relocs = _free(p->relocs);
     }
diff --git a/rpmqv.c b/rpmqv.c
index 6b24ecc..4e54aae 100644 (file)
--- a/rpmqv.c
+++ b/rpmqv.c
@@ -859,7 +859,7 @@ exit:
 #ifdef IAM_RPMEIU
     if (ia->relocations != NULL)
     for (i = 0; i < ia->numRelocations; i++)
-       ia->relocations[i].oldPath = _constfree(ia->relocations[i].oldPath);
+       ia->relocations[i].oldPath = _free(ia->relocations[i].oldPath);
     ia->relocations = _free(ia->relocations);
 #endif