diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-12-14 17:55:31 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-12-14 17:55:31 +0200 |
commit | 61e35657a6e3ce33a44067e82bb382b8b3133c4a (patch) | |
tree | 9166d361f00b8658c46ceec871e1d45be6af0a98 /lib | |
parent | f5a712db5be29cf130a545af0645432713f6fa26 (diff) | |
download | librpm-tizen-61e35657a6e3ce33a44067e82bb382b8b3133c4a.tar.gz librpm-tizen-61e35657a6e3ce33a44067e82bb382b8b3133c4a.tar.bz2 librpm-tizen-61e35657a6e3ce33a44067e82bb382b8b3133c4a.zip |
Another bunch of bogus const removals
Diffstat (limited to 'lib')
-rw-r--r-- | lib/depends.c | 4 | ||||
-rw-r--r-- | lib/formats.c | 4 | ||||
-rw-r--r-- | lib/package.c | 2 | ||||
-rw-r--r-- | lib/poptALL.c | 2 | ||||
-rw-r--r-- | lib/psm.c | 2 | ||||
-rw-r--r-- | lib/query.c | 2 | ||||
-rw-r--r-- | lib/rpmchecksig.c | 2 | ||||
-rw-r--r-- | lib/rpmds.c | 4 | ||||
-rw-r--r-- | lib/rpmgi.c | 4 | ||||
-rw-r--r-- | lib/rpminstall.c | 2 | ||||
-rw-r--r-- | lib/rpmps.c | 2 | ||||
-rw-r--r-- | lib/rpmrc.c | 6 | ||||
-rw-r--r-- | lib/rpmts.c | 18 |
13 files changed, 27 insertions, 27 deletions
diff --git a/lib/depends.c b/lib/depends.c index 9f0d8cf12..d4b9f4aaf 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -333,7 +333,7 @@ addheader: */ if (rpmdsEVR(obsoletes) == NULL || rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) { - const char * ohNEVRA = headerGetNEVRA(oh, NULL); + char * ohNEVRA = headerGetNEVRA(oh, NULL); #ifdef DYING /* XXX see http://bugzilla.redhat.com #134497 */ if (rpmVersionCompare(h, oh)) #endif @@ -654,7 +654,7 @@ static int checkPackageSet(rpmts ts, const char * dep, (void) rpmdbPruneIterator(mi, ts->removedPackages, ts->numRemovedPackages, 1); while ((h = rpmdbNextIterator(mi)) != NULL) { - const char * pkgNEVRA; + char * pkgNEVRA; rpmds requires, conflicts; int rc; diff --git a/lib/formats.c b/lib/formats.c index 83cc02064..204293eec 100644 --- a/lib/formats.c +++ b/lib/formats.c @@ -185,7 +185,7 @@ static char * base64Format(rpm_tagtype_t type, const void * data, if (type != RPM_BIN_TYPE) { val = xstrdup(_("(not a blob)")); } else { - const char * enc; + char * enc; char * t; /* XXX HACK ALERT: element field abused as no. bytes of binary data. */ size_t ns = element; @@ -260,7 +260,7 @@ static char * xmlFormat(rpm_tagtype_t type, const void * data, const char * xtag = NULL; size_t nb; char * val; - const char * s = NULL; + char * s = NULL; char * t, * te; unsigned long anint = 0; int xx; diff --git a/lib/package.c b/lib/package.c index 27e303636..150fb0eff 100644 --- a/lib/package.c +++ b/lib/package.c @@ -967,7 +967,7 @@ rpmRC headerCheckPayloadFormat(Header h) { if (payloadfmt && strncmp(payloadfmt, "cpio", strlen("cpio")) == 0) { rc = RPMRC_OK; } else { - const char *nevra = headerGetNEVRA(h, NULL); + char *nevra = headerGetNEVRA(h, NULL); if (payloadfmt && strncmp(payloadfmt, "drpm", strlen("drpm")) == 0) { rpmlog(RPMLOG_ERR, _("%s is a Delta RPM and cannot be directly installed\n"), diff --git a/lib/poptALL.c b/lib/poptALL.c index 15023c8ac..01267e564 100644 --- a/lib/poptALL.c +++ b/lib/poptALL.c @@ -128,7 +128,7 @@ static void rpmcliAllArgCallback( poptContext con, break; case 'E': rpmcliConfigured(); - { const char *val = rpmExpand(arg, NULL); + { char *val = rpmExpand(arg, NULL); fprintf(stdout, "%s\n", val); val = _free(val); } @@ -797,7 +797,7 @@ static rpmRC runScript(rpmpsm psm, Header h, rpm_tag_t stag, xx = Fclose (scriptFd); } - { const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL); + { char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL); const char *path = SCRIPT_PATH; if (ipath && ipath[5] != '%') diff --git a/lib/query.c b/lib/query.c index eaf5d9599..7a4ec85ed 100644 --- a/lib/query.c +++ b/lib/query.c @@ -600,7 +600,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg) else fn = xstrdup(arg); } else if (*arg != '/') { - const char *curDir = currentDirectory(); + char *curDir = currentDirectory(); fn = (char *) rpmGetPath(curDir, "/", arg, NULL); curDir = _free(curDir); } else diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c index 100f7b813..bd374b065 100644 --- a/lib/rpmchecksig.c +++ b/lib/rpmchecksig.c @@ -397,7 +397,7 @@ static int rpmcliImportPubkeys(const rpmts ts, const char ** argv) { const char * fn; - const unsigned char * pkt = NULL; + unsigned char * pkt = NULL; size_t pktlen = 0; char * t = NULL; int res = 0; diff --git a/lib/rpmds.c b/lib/rpmds.c index 322c54045..b56d7aa46 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -779,8 +779,8 @@ void parseEVR(char * evr, int rpmdsCompare(const rpmds A, const rpmds B) { - const char *aDepend = (A->DNEVR != NULL ? xstrdup(A->DNEVR+2) : ""); - const char *bDepend = (B->DNEVR != NULL ? xstrdup(B->DNEVR+2) : ""); + char *aDepend = (A->DNEVR != NULL ? xstrdup(A->DNEVR+2) : ""); + char *bDepend = (B->DNEVR != NULL ? xstrdup(B->DNEVR+2) : ""); char *aEVR, *bEVR; const char *aE, *aV, *aR, *bE, *bV, *bR; int result; diff --git a/lib/rpmgi.c b/lib/rpmgi.c index f9e7fa9a1..c590188bd 100644 --- a/lib/rpmgi.c +++ b/lib/rpmgi.c @@ -90,7 +90,7 @@ static const char * ftsInfoStr(int fts_info) */ static FD_t rpmgiOpen(const char * path, const char * fmode) { - const char * fn = rpmExpand(path, NULL); + char * fn = rpmExpand(path, NULL); FD_t fd = Fopen(fn, fmode); if (fd == NULL || Ferror(fd)) { @@ -169,7 +169,7 @@ static rpmRC rpmgiLoadReadHeader(rpmgi gi) if (gi->argv != NULL && gi->argv[gi->i] != NULL) do { - const char * fn; /* XXX gi->hdrPath? */ + char * fn; /* XXX gi->hdrPath? */ fn = gi->argv[gi->i]; if (!(gi->flags & RPMGI_NOHEADER)) { diff --git a/lib/rpminstall.c b/lib/rpminstall.c index c0841b35c..04761f342 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -888,7 +888,7 @@ int rpmRollback(rpmts ts, struct rpmInstallArguments_s * ia, const char ** argv) niids = 0; } - { const char * globstr = rpmExpand("%{_repackage_dir}/*.rpm", NULL); + { char * globstr = rpmExpand("%{_repackage_dir}/*.rpm", NULL); if (globstr == NULL || *globstr == '%') { globstr = _free(globstr); rc = -1; diff --git a/lib/rpmps.c b/lib/rpmps.c index de6783d6f..bb78e51db 100644 --- a/lib/rpmps.c +++ b/lib/rpmps.c @@ -399,7 +399,7 @@ static int sameProblem(const rpmProblem ap, const rpmProblem bp) void rpmpsPrint(FILE *fp, rpmps ps) { - const char * msg; + char * msg = NULL; rpmpsi psi = NULL; int i; diff --git a/lib/rpmrc.c b/lib/rpmrc.c index 24f7f50b9..1a8f0430e 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -998,7 +998,7 @@ static void defaultMachine(const char ** arch, while (!gotDefaults) { if (!rpmPlatform(platform)) { - const char * s; + char * s; s = rpmExpand("%{_host_cpu}", NULL); if (s) { strncpy(un.machine, s, sizeof(un.machine)); @@ -1696,8 +1696,8 @@ int rpmReadConfigFiles(const char * file, const char * target) rpmRebuildTargetVars(&target, NULL); /* Finally set target platform */ - { const char *cpu = rpmExpand("%{_target_cpu}", NULL); - const char *os = rpmExpand("%{_target_os}", NULL); + { char *cpu = rpmExpand("%{_target_cpu}", NULL); + char *os = rpmExpand("%{_target_os}", NULL); rpmSetMachine(cpu, os); cpu = _free(cpu); os = _free(os); diff --git a/lib/rpmts.c b/lib/rpmts.c index d8ddf6bec..bf7ca2861 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -265,7 +265,7 @@ rpmRC rpmtsFindPubkey(rpmts ts) pgpDigParams sigp = rpmtsSignature(ts); pgpDigParams pubp = rpmtsPubkey(ts); rpmRC res = RPMRC_NOKEY; - const char * pubkeysource = NULL; + char * pubkeysource = NULL; int xx; if (sig == NULL || dig == NULL || sigp == NULL || pubp == NULL) @@ -325,7 +325,7 @@ fprintf(stderr, "*** free pkt %p[%d] id %08x %08x\n", ts->pkpkt, ts->pkpktlen, p /* Try keyserver lookup. */ if (ts->pkpkt == NULL) { - const char * fn = rpmExpand("%{_hkp_keyserver_query}", + char * fn = rpmExpand("%{_hkp_keyserver_query}", pgpHexStr(sigp->signid, sizeof(sigp->signid)), NULL); xx = 0; @@ -411,13 +411,13 @@ rpmRC rpmtsImportPubkey(const rpmts ts, const unsigned char * pkt, size_t pktlen int32_t zero = 0; pgpDig dig = NULL; pgpDigParams pubp = NULL; - const char * d = NULL; - const char * enc = NULL; - const char * n = NULL; - const char * u = NULL; - const char * v = NULL; - const char * r = NULL; - const char * evr = NULL; + char * d = NULL; + char * enc = NULL; + char * n = NULL; + char * u = NULL; + char * v = NULL; + char * r = NULL; + char * evr = NULL; Header h = NULL; rpmRC rc = RPMRC_FAIL; /* assume failure */ char * t; |