diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-12-15 10:39:15 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-12-15 10:39:15 +0200 |
commit | b6a663ec0a421d822578d831153bc0fbc2d6f410 (patch) | |
tree | 381661095b6906f8bf850835476079db9f5a03d8 /lib | |
parent | dce66192f2f01817b3027c8c61c770abbfffd131 (diff) | |
download | rpm-b6a663ec0a421d822578d831153bc0fbc2d6f410.tar.gz rpm-b6a663ec0a421d822578d831153bc0fbc2d6f410.tar.bz2 rpm-b6a663ec0a421d822578d831153bc0fbc2d6f410.zip |
Remove bogus const from rpmGetPath() temporary targets
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fs.c | 2 | ||||
-rw-r--r-- | lib/psm.c | 4 | ||||
-rw-r--r-- | lib/rpmrc.c | 5 | ||||
-rw-r--r-- | lib/rpmts.c | 6 | ||||
-rw-r--r-- | lib/signature.c | 2 | ||||
-rw-r--r-- | lib/transaction.c | 2 |
6 files changed, 10 insertions, 11 deletions
@@ -263,7 +263,7 @@ int rpmGetFilesystemUsage(const char ** fileList, int32_t * fssizes, char * chptr; int maxLen; char * lastDir; - const char * sourceDir; + char * sourceDir; int lastfs = 0; int lastDev = -1; /* I hope nobody uses -1 for a st_dev */ struct stat sb; @@ -655,7 +655,7 @@ static rpmRC runScript(rpmpsm psm, Header h, rpm_tag_t stag, if ((a != NULL && a[0] == 'i' && a[1] != '\0' && a[2] == '8' && a[3] == '6') && strcmp(argv[0], "/sbin/ldconfig")) { - const char * fmt = rpmGetPath("%{?_autorelocate_path}", NULL); + char * fmt = rpmGetPath("%{?_autorelocate_path}", NULL); const char * errstr; char * newPath; char * t; @@ -1397,7 +1397,7 @@ assert(psm->mi == NULL); } if (psm->goal == PSM_PKGSAVE) { /* Open output package for writing. */ - { const char * bfmt = rpmGetPath("%{_repackage_name_fmt}", NULL); + { char * bfmt = rpmGetPath("%{_repackage_name_fmt}", NULL); const char * pkgbn = headerSprintf(fi->h, bfmt, rpmTagTable, rpmHeaderFormats, NULL); diff --git a/lib/rpmrc.c b/lib/rpmrc.c index 1a8f0430e..2900188dc 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -568,7 +568,8 @@ static rpmRC doReadRC( FD_t fd, const char * urlfn) sizeof(optionTable[0]), optionCompare); if (option) { /* For configuration variables ... */ - const char *arch, *val, *fn; + const char *arch, *val; + char *fn; arch = val = fn = NULL; if (*se == '\0') { @@ -1687,7 +1688,7 @@ int rpmReadConfigFiles(const char * file, const char * target) if (rpmReadRC(file)) return -1; if (macrofiles != NULL) { - const char *mf = rpmGetPath(macrofiles, NULL); + char *mf = rpmGetPath(macrofiles, NULL); rpmInitMacros(NULL, mf); _free(mf); } diff --git a/lib/rpmts.c b/lib/rpmts.c index bf7ca2861..c511f1700 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -95,8 +95,7 @@ int rpmtsOpenDB(rpmts ts, int dbmode) ts->dbmode = dbmode; rc = rpmdbOpen(ts->rootDir, &ts->rdb, ts->dbmode, 0644); if (rc) { - const char * dn; - dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL); + char * dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL); rpmlog(RPMLOG_ERR, _("cannot open Packages database in %s\n"), dn); dn = _free(dn); @@ -567,8 +566,7 @@ int rpmtsOpenSDB(rpmts ts, int dbmode) rc = rpmdbOpen(ts->rootDir, &ts->sdb, ts->sdbmode, 0644); if (rc) { - const char * dn; - dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL); + char * dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL); rpmlog(RPMLOG_WARNING, _("cannot open Solve database in %s\n"), dn); dn = _free(dn); diff --git a/lib/signature.c b/lib/signature.c index 2422cf7c0..b3ce85816 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -67,7 +67,7 @@ const char * rpmDetectPGPVersion(pgpVersion * pgpVer) /* have one %_pgpbin and one %_pgp_path. */ static pgpVersion saved_pgp_version = PGP_UNKNOWN; - const char *pgpbin = rpmGetPath("%{?_pgpbin}", NULL); + char *pgpbin = rpmGetPath("%{?_pgpbin}", NULL); if (saved_pgp_version == PGP_UNKNOWN) { char *pgpvbin; diff --git a/lib/transaction.c b/lib/transaction.c index c97d6bc74..bd5f774c9 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1353,7 +1353,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) } if (!rpmtsFlags(ts) & RPMTRANS_FLAG_NOCONTEXTS) { - const char *fn = rpmGetPath("%{?_install_file_context_path}", NULL); + char *fn = rpmGetPath("%{?_install_file_context_path}", NULL); if (matchpathcon_init(fn) == -1) { rpmtsSetFlags(ts, (rpmtsFlags(ts) | RPMTRANS_FLAG_NOCONTEXTS)); } |