Eliminate bogus const's from spec structure
This commit is contained in:
parent
2cf64e95f2
commit
c4659498e3
|
@ -718,7 +718,7 @@ rpmRC packageSources(rpmSpec spec)
|
|||
|
||||
(void) genSourceRpmName(spec);
|
||||
|
||||
spec->cookie = _constfree(spec->cookie);
|
||||
spec->cookie = _free(spec->cookie);
|
||||
|
||||
/* XXX this should be %_srpmdir */
|
||||
{ char *fn = rpmGetPath("%{_srcrpmdir}/", spec->sourceRpmName,NULL);
|
||||
|
|
|
@ -92,10 +92,10 @@ char **sl_lines;
|
|||
* The structure used to store values parsed from a spec file.
|
||||
*/
|
||||
struct rpmSpec_s {
|
||||
const char * specFile; /*!< Name of the spec file. */
|
||||
const char * buildRootURL;
|
||||
const char * buildSubdir;
|
||||
const char * rootURL;
|
||||
char * specFile; /*!< Name of the spec file. */
|
||||
char * buildRootURL;
|
||||
char * buildSubdir;
|
||||
char * rootURL;
|
||||
|
||||
speclines sl;
|
||||
spectags st;
|
||||
|
@ -123,13 +123,13 @@ struct rpmSpec_s {
|
|||
|
||||
char * passPhrase;
|
||||
int timeCheck;
|
||||
const char * cookie;
|
||||
char * cookie;
|
||||
|
||||
struct Source * sources;
|
||||
int numSources;
|
||||
int noSource;
|
||||
|
||||
const char * sourceRpmName;
|
||||
char * sourceRpmName;
|
||||
unsigned char * sourcePkgId;
|
||||
Header sourceHeader;
|
||||
rpmfi sourceCpioList;
|
||||
|
@ -158,19 +158,19 @@ struct Package_s {
|
|||
int autoReq;
|
||||
int autoProv;
|
||||
|
||||
const char * preInFile; /*!< %pre scriptlet. */
|
||||
const char * postInFile; /*!< %post scriptlet. */
|
||||
const char * preUnFile; /*!< %preun scriptlet. */
|
||||
const char * postUnFile; /*!< %postun scriptlet. */
|
||||
const char * preTransFile; /*!< %pretrans scriptlet. */
|
||||
const char * postTransFile; /*!< %posttrans scriptlet. */
|
||||
const char * verifyFile; /*!< %verifyscript scriptlet. */
|
||||
char * preInFile; /*!< %pre scriptlet. */
|
||||
char * postInFile; /*!< %post scriptlet. */
|
||||
char * preUnFile; /*!< %preun scriptlet. */
|
||||
char * postUnFile; /*!< %postun scriptlet. */
|
||||
char * preTransFile; /*!< %pretrans scriptlet. */
|
||||
char * postTransFile; /*!< %posttrans scriptlet. */
|
||||
char * verifyFile; /*!< %verifyscript scriptlet. */
|
||||
|
||||
StringBuf specialDoc;
|
||||
|
||||
struct TriggerFileEntry * triggerFiles;
|
||||
|
||||
const char * fileFile;
|
||||
char * fileFile;
|
||||
StringBuf fileList; /* If NULL, package will not be written */
|
||||
|
||||
Package next;
|
||||
|
|
24
build/spec.c
24
build/spec.c
|
@ -153,16 +153,16 @@ Package freePackage(Package pkg)
|
|||
{
|
||||
if (pkg == NULL) return NULL;
|
||||
|
||||
pkg->preInFile = _constfree(pkg->preInFile);
|
||||
pkg->postInFile = _constfree(pkg->postInFile);
|
||||
pkg->preUnFile = _constfree(pkg->preUnFile);
|
||||
pkg->postUnFile = _constfree(pkg->postUnFile);
|
||||
pkg->verifyFile = _constfree(pkg->verifyFile);
|
||||
pkg->preInFile = _free(pkg->preInFile);
|
||||
pkg->postInFile = _free(pkg->postInFile);
|
||||
pkg->preUnFile = _free(pkg->preUnFile);
|
||||
pkg->postUnFile = _free(pkg->postUnFile);
|
||||
pkg->verifyFile = _free(pkg->verifyFile);
|
||||
|
||||
pkg->header = headerFree(pkg->header);
|
||||
pkg->ds = rpmdsFree(pkg->ds);
|
||||
pkg->fileList = freeStringBuf(pkg->fileList);
|
||||
pkg->fileFile = _constfree(pkg->fileFile);
|
||||
pkg->fileFile = _free(pkg->fileFile);
|
||||
if (pkg->cpioList) {
|
||||
rpmfi fi = pkg->cpioList;
|
||||
pkg->cpioList = NULL;
|
||||
|
@ -492,10 +492,10 @@ rpmSpec freeSpec(rpmSpec spec)
|
|||
spec->check = freeStringBuf(spec->check);
|
||||
spec->clean = freeStringBuf(spec->clean);
|
||||
|
||||
spec->buildRootURL = _constfree(spec->buildRootURL);
|
||||
spec->buildSubdir = _constfree(spec->buildSubdir);
|
||||
spec->rootURL = _constfree(spec->rootURL);
|
||||
spec->specFile = _constfree(spec->specFile);
|
||||
spec->buildRootURL = _free(spec->buildRootURL);
|
||||
spec->buildSubdir = _free(spec->buildSubdir);
|
||||
spec->rootURL = _free(spec->rootURL);
|
||||
spec->specFile = _free(spec->specFile);
|
||||
|
||||
closeSpec(spec);
|
||||
|
||||
|
@ -506,7 +506,7 @@ rpmSpec freeSpec(rpmSpec spec)
|
|||
rl = _free(rl);
|
||||
}
|
||||
|
||||
spec->sourceRpmName = _constfree(spec->sourceRpmName);
|
||||
spec->sourceRpmName = _free(spec->sourceRpmName);
|
||||
spec->sourcePkgId = _free(spec->sourcePkgId);
|
||||
spec->sourceHeader = headerFree(spec->sourceHeader);
|
||||
|
||||
|
@ -529,7 +529,7 @@ rpmSpec freeSpec(rpmSpec spec)
|
|||
spec->BANames = _free(spec->BANames);
|
||||
|
||||
spec->passPhrase = _free(spec->passPhrase);
|
||||
spec->cookie = _constfree(spec->cookie);
|
||||
spec->cookie = _free(spec->cookie);
|
||||
|
||||
#ifdef WITH_LUA
|
||||
rpmlua lua = NULL; /* global state */
|
||||
|
|
Loading…
Reference in New Issue