diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-12-18 12:53:57 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-12-18 12:53:57 +0200 |
commit | 4f9b7814fa510b5197d5e423b48ad8aa304ce133 (patch) | |
tree | 36678dba042a6b4049256928c3242f653daa0154 | |
parent | 22d169c102c531aa2eca7d232818bfe38ca73f45 (diff) | |
download | librpm-tizen-4f9b7814fa510b5197d5e423b48ad8aa304ce133.tar.gz librpm-tizen-4f9b7814fa510b5197d5e423b48ad8aa304ce133.tar.bz2 librpm-tizen-4f9b7814fa510b5197d5e423b48ad8aa304ce133.zip |
Drop bogus const from rpmReadPackageManifest argvptr
- it's malloced and needs freeing by the caller..
-rw-r--r-- | lib/manifest.c | 6 | ||||
-rw-r--r-- | lib/manifest.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/manifest.c b/lib/manifest.c index 2b010525a..7c89db811 100644 --- a/lib/manifest.c +++ b/lib/manifest.c @@ -59,7 +59,7 @@ char * rpmPermsString(int mode) } /**@todo Infinite loops through manifest files exist, operator error for now. */ -rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr) +rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, char *** argvPtr) { StringBuf sb = newStringBuf(); char * s = NULL; @@ -67,7 +67,7 @@ rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr) int ac = 0; char ** av = NULL; int argc = (argcPtr ? *argcPtr : 0); - const char ** argv = (argvPtr ? *argvPtr : NULL); + char ** argv = (argvPtr ? *argvPtr : NULL); FILE * f = fdGetFILE(fd); rpmRC rpmrc = RPMRC_OK; int i, j, next, npre; @@ -134,7 +134,7 @@ rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr) /* Copy old arg list, inserting manifest before argv[next]. */ if (argv != NULL) { int nac = npre + ac; - const char ** nav = xcalloc((nac + 1), sizeof(*nav)); + char ** nav = xcalloc((nac + 1), sizeof(*nav)); for (i = 0, j = 0; i < next; i++) { if (argv[i] != NULL) diff --git a/lib/manifest.h b/lib/manifest.h index 7b3fc43f1..227ca0089 100644 --- a/lib/manifest.h +++ b/lib/manifest.h @@ -25,7 +25,7 @@ char * rpmPermsString(int mode) * @retval argvPtr args themselves * @return RPMRC_OK on success */ -rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr); +rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, char *** argvPtr); #ifdef __cplusplus } |