diff options
-rw-r--r-- | build.c | 2 | ||||
-rw-r--r-- | build/build.c | 4 | ||||
-rw-r--r-- | build/files.c | 9 | ||||
-rw-r--r-- | build/pack.c | 10 | ||||
-rw-r--r-- | build/parsePreamble.c | 2 | ||||
-rw-r--r-- | build/parsePrep.c | 4 | ||||
-rw-r--r-- | build/spec.c | 2 | ||||
-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 | ||||
-rw-r--r-- | rpmdb/db3.c | 6 | ||||
-rw-r--r-- | rpmdb/rpmdb.c | 10 | ||||
-rw-r--r-- | rpmio/rpmfileutil.c | 2 |
16 files changed, 36 insertions, 36 deletions
@@ -112,7 +112,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) /* FIX: static zcmds heartburn */ if (ba->buildMode == 't') { FILE *fp; - const char * specDir; + char * specDir; char * tmpSpecFile; char * cmd, * s; rpmCompressedMagic res = COMPRESSED_OTHER; diff --git a/build/build.c b/build/build.c index 177cbd223..7a6074c3a 100644 --- a/build/build.c +++ b/build/build.c @@ -27,7 +27,7 @@ static void doRmSource(rpmSpec spec) for (p = spec->sources; p != NULL; p = p->next) { if (! (p->flags & RPMBUILD_ISNO)) { - const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL); + char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL); rc = unlink(fn); fn = _free(fn); } @@ -36,7 +36,7 @@ static void doRmSource(rpmSpec spec) for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { for (p = pkg->icon; p != NULL; p = p->next) { if (! (p->flags & RPMBUILD_ISNO)) { - const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL); + char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL); rc = unlink(fn); fn = _free(fn); } diff --git a/build/files.c b/build/files.c index 6c1cb6b87..206ada4a3 100644 --- a/build/files.c +++ b/build/files.c @@ -922,7 +922,8 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf, { static const char *_docdir_fmt = NULL; static int oneshot = 0; - const char *ddir, *fmt, *errstr; + char *ddir, *fmt; + errmsg_t errstr; if (!oneshot) { _docdir_fmt = rpmExpand("%{?_docdir_fmt}", NULL); if (!_docdir_fmt || !*_docdir_fmt) @@ -1782,7 +1783,7 @@ static rpmRC processPackageFiles(rpmSpec spec, Package pkg, pkg->cpioList = NULL; if (pkg->fileFile) { - const char *ffn; + char *ffn; FILE * f; FD_t fd; @@ -2123,7 +2124,7 @@ int processSourceFiles(rpmSpec spec) } } - { const char * sfn; + { char * sfn; sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""), "%{_sourcedir}/", srcPtr->source, NULL); appendLineStringBuf(sourceFiles, sfn); @@ -2133,7 +2134,7 @@ int processSourceFiles(rpmSpec spec) for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { for (srcPtr = pkg->icon; srcPtr != NULL; srcPtr = srcPtr->next) { - const char * sfn; + char * sfn; sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""), "%{_sourcedir}/", srcPtr->source, NULL); appendLineStringBuf(sourceFiles, sfn); diff --git a/build/pack.c b/build/pack.c index c40543894..30871378d 100644 --- a/build/pack.c +++ b/build/pack.c @@ -116,7 +116,7 @@ static StringBuf addFileToTagAux(rpmSpec spec, const char * file, StringBuf sb) { char buf[BUFSIZ]; - const char * fn = buf; + char * fn = buf; FILE * f; FD_t fd; @@ -610,7 +610,7 @@ rpmRC packageBinaries(rpmSpec spec) Package pkg; for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { - const char *fn; + char *fn; if (pkg->fileList == NULL) continue; @@ -649,7 +649,7 @@ rpmRC packageBinaries(rpmSpec spec) spec->sourcePkgId, 16); } - { const char *binFormat = rpmGetPath("%{_rpmfilename}", NULL); + { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL); char *binRpm, *binDir; binRpm = headerSprintf(pkg->header, binFormat, rpmTagTable, rpmHeaderFormats, &errorString); @@ -664,7 +664,7 @@ rpmRC packageBinaries(rpmSpec spec) fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL); if ((binDir = strchr(binRpm, '/')) != NULL) { struct stat st; - const char *dn; + char *dn; *binDir = '\0'; dn = rpmGetPath("%{_rpmdir}/", binRpm, NULL); if (stat(dn, &st) < 0) { @@ -721,7 +721,7 @@ rpmRC packageSources(rpmSpec spec) spec->cookie = _free(spec->cookie); /* XXX this should be %_srpmdir */ - { const char *fn = rpmGetPath("%{_srcrpmdir}/", spec->sourceRpmName,NULL); + { char *fn = rpmGetPath("%{_srcrpmdir}/", spec->sourceRpmName,NULL); memset(csa, 0, sizeof(*csa)); csa->cpioArchiveSize = 0; diff --git a/build/parsePreamble.c b/build/parsePreamble.c index 761e3c9b5..9f4c6b61d 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -323,7 +323,7 @@ static void fillOutMainPackage(Header h) */ static rpmRC readIcon(Header h, const char * file) { - const char *fn = NULL; + char *fn = NULL; char *icon; FD_t fd; rpmRC rc = RPMRC_OK; diff --git a/build/parsePrep.c b/build/parsePrep.c index 13a130b58..5306ec902 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -121,7 +121,7 @@ static char *doPatch(rpmSpec spec, int c, int strip, const char *db, } if (compressed) { - const char *zipper = rpmGetPath( + char *zipper = rpmGetPath( (compressed == COMPRESSED_BZIP2 ? "%{_bzip2bin}" : "%{_gzipbin}"), NULL); @@ -222,7 +222,7 @@ static const char *doUntar(rpmSpec spec, int c, int quietly) } if (compressed != COMPRESSED_NOT) { - const char *zipper; + char *zipper; int needtar = 1; switch (compressed) { diff --git a/build/spec.c b/build/spec.c index e66c63107..cdf5363a0 100644 --- a/build/spec.c +++ b/build/spec.c @@ -319,7 +319,7 @@ int addSource(rpmSpec spec, Package pkg, const char *field, rpm_tag_t tag) spec->numSources++; if (tag != RPMTAG_ICON) { - const char *body = rpmGetPath("%{_sourcedir}/", p->source, NULL); + char *body = rpmGetPath("%{_sourcedir}/", p->source, NULL); sprintf(buf, "%s%d", (flag & RPMBUILD_ISPATCH) ? "PATCH" : "SOURCE", num); @@ -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)); } diff --git a/rpmdb/db3.c b/rpmdb/db3.c index 7e7fc1aa3..b741e627c 100644 --- a/rpmdb/db3.c +++ b/rpmdb/db3.c @@ -731,7 +731,7 @@ static int db3close(dbiIndex dbi, unsigned int flags) rc = cvtdberr(dbi, "db_create", rc, _debug); if (db != NULL) { - const char * dbf = rpmGetPath(dbhome, "/", dbfile, NULL); + char * dbf = rpmGetPath(dbhome, "/", dbfile, NULL); rc = db->verify(db, dbf, NULL, NULL, flags); rc = cvtdberr(dbi, "db->verify", rc, _debug); @@ -883,7 +883,7 @@ static int db3open(rpmdb rpmdb, rpm_tag_t rpmtag, dbiIndex * dbip) } } else { /* dbhome is writable, check for persistent dbenv. */ - const char * dbf = rpmGetPath(dbhome, "/__db.001", NULL); + char * dbf = rpmGetPath(dbhome, "/__db.001", NULL); if (access(dbf, F_OK) == -1) { /* ... non-existent (or unwritable) DBENV, will create ... */ @@ -909,7 +909,7 @@ static int db3open(rpmdb rpmdb, rpm_tag_t rpmtag, dbiIndex * dbip) if ((oflags & DB_CREATE) && (oflags & DB_RDONLY)) { /* dbhome is writable, and DB->open flags may conflict. */ const char * dbfn = (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag)); - const char * dbf = rpmGetPath(dbhome, "/", dbfn, NULL); + char * dbf = rpmGetPath(dbhome, "/", dbfn, NULL); if (access(dbf, F_OK) == -1) { /* File does not exist, DB->open might create ... */ diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index 03cc1ba3c..707488152 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -3417,12 +3417,12 @@ int rpmdbRebuild(const char * prefix, rpmts ts, rpmRC (*hdrchk) (rpmts ts, const void *uh, size_t uc, const char ** msg)) { rpmdb olddb; - const char * dbpath = NULL; - const char * rootdbpath = NULL; + char * dbpath = NULL; + char * rootdbpath = NULL; rpmdb newdb; - const char * newdbpath = NULL; - const char * newrootdbpath = NULL; - const char * tfn; + char * newdbpath = NULL; + char * newrootdbpath = NULL; + char * tfn; int nocleanup = 1; int failed = 0; int removedir = 0; diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c index e3b57e785..3722809f5 100644 --- a/rpmio/rpmfileutil.c +++ b/rpmio/rpmfileutil.c @@ -519,7 +519,7 @@ const char * xmdir = rpmGetPath(urlmdir, NULL); const char * mdir = xmdir; const char * xfile = rpmGetPath(urlfile, NULL); const char * file = xfile; - const char * result; + char * result; const char * url = NULL; int nurl = 0; int ut; |