Remove const from rpmMkTempFile file name parameter
- the temp name is malloced and needs to be freed by caller
This commit is contained in:
parent
3ec48632b8
commit
14284725e6
|
@ -51,7 +51,7 @@ rpmRC doScript(rpmSpec spec, rpmBuildFlags what, const char *name, StringBuf sb,
|
|||
{
|
||||
const char * rootURL = spec->rootURL;
|
||||
const char * rootDir;
|
||||
const char *scriptName = NULL;
|
||||
char *scriptName = NULL;
|
||||
char * buildDirURL = rpmGenPath(rootURL, "%{_builddir}", "");
|
||||
const char * buildScript;
|
||||
char * buildCmd = NULL;
|
||||
|
|
|
@ -347,7 +347,7 @@ rpmRC writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName,
|
|||
FD_t fd = NULL;
|
||||
FD_t ifd = NULL;
|
||||
int32_t count, sigtag;
|
||||
const char * sigtarget = NULL;;
|
||||
char * sigtarget = NULL;;
|
||||
char * rpmio_flags = NULL;
|
||||
const char * SHA1 = NULL;
|
||||
char *s;
|
||||
|
|
|
@ -588,7 +588,7 @@ static rpmRC runScript(rpmpsm psm, Header h, rpm_tag_t stag,
|
|||
int maxPrefixLength;
|
||||
int len;
|
||||
char * prefixBuf = NULL;
|
||||
const char * fn = NULL;
|
||||
char * fn = NULL;
|
||||
int xx;
|
||||
int i;
|
||||
int freePrefixes = 0;
|
||||
|
|
|
@ -144,7 +144,7 @@ static int rpmReSign(rpmts ts,
|
|||
rpmlead lead;
|
||||
rpm_tag_t sigtag;
|
||||
const char *rpm, *trpm;
|
||||
const char *sigtarget = NULL;
|
||||
char *sigtarget = NULL;
|
||||
char tmprpm[1024+1];
|
||||
Header sigh = NULL;
|
||||
char * msg;
|
||||
|
|
|
@ -614,7 +614,7 @@ static int makeHDRSignature(Header sigh, const char * file, rpm_tag_t sigTag,
|
|||
FD_t fd = NULL;
|
||||
uint8_t * pkt;
|
||||
size_t pktlen;
|
||||
const char * fn = NULL;
|
||||
char * fn = NULL;
|
||||
const char * SHA1 = NULL;
|
||||
int ret = -1; /* assume failure. */
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ exit:
|
|||
return rc;
|
||||
}
|
||||
|
||||
int rpmMkTempFile(const char * prefix, const char ** fnptr, FD_t * fdptr)
|
||||
int rpmMkTempFile(const char * prefix, char ** fnptr, FD_t * fdptr)
|
||||
{
|
||||
const char * tpmacro = "%{?_tmppath:%{_tmppath}}%{!?_tmppath:" LOCALSTATEDIR "/tmp}";
|
||||
char * tempfn = NULL;
|
||||
|
|
|
@ -45,7 +45,7 @@ int rpmDoDigest(pgpHashAlgo algo, const char * fn,int asAscii,
|
|||
* @retval fdptr temp file handle
|
||||
* @return 0 on success
|
||||
*/
|
||||
int rpmMkTempFile(const char * prefix, const char ** fnptr, FD_t * fdptr);
|
||||
int rpmMkTempFile(const char * prefix, char ** fnptr, FD_t * fdptr);
|
||||
|
||||
/** \ingroup rpmfileutil
|
||||
* Insure that directories in path exist, creating as needed.
|
||||
|
|
Loading…
Reference in New Issue