summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJindrich Novy <jnovy@redhat.com>2008-04-29 15:40:20 +0200
committerJindrich Novy <jnovy@redhat.com>2008-04-29 15:40:20 +0200
commitf05198ca5ec06fe48805b55ec51ef600612804cf (patch)
tree3362a9e5ee82fc95266427b990048c026dab2c63
parent6918806da894917a9d7d87fa3e75b850928e0a57 (diff)
downloadrpm-f05198ca5ec06fe48805b55ec51ef600612804cf.tar.gz
rpm-f05198ca5ec06fe48805b55ec51ef600612804cf.tar.bz2
rpm-f05198ca5ec06fe48805b55ec51ef600612804cf.zip
Calm down compiler warnings due to fsm->patch being const
-rw-r--r--lib/fsm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/fsm.c b/lib/fsm.c
index 717982ee8..eab56d584 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -827,17 +827,18 @@ static int writeFile(FSM_t fsm, int writeData)
}
if (fsm->mapFlags & CPIO_MAP_ABSOLUTE) {
- fsm->path = NULL;
+ char *p = NULL;
if (fsm->mapFlags & CPIO_MAP_ADDDOT)
- rstrcat(&fsm->path, ".");
- rstrscat(&fsm->path, fsm->dirName, fsm->baseName, NULL);
+ rstrcat(&p, ".");
+ rstrscat(&p, fsm->dirName, fsm->baseName, NULL);
+ fsm->path = p;
} else if (fsm->mapFlags & CPIO_MAP_PATH) {
rpmfi fi = fsmGetFi(fsm);
fsm->path = xstrdup((fi->apath ? fi->apath[fsm->ix] + fi->striplen : fi->bnl[fsm->ix]));
}
rc = fsmNext(fsm, FSM_HWRITE);
- free(fsm->path);
+ _constfree(fsm->path);
fsm->path = path;
if (rc) goto exit;
@@ -1901,7 +1902,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
(void) fsmNext(fsm, FSM_UNLINK);
else
rc = CPIOERR_UNLINK_FAILED;
- free(fsm->path);
+ _constfree(fsm->path);
fsm->path = fsm->opath;
fsm->opath = NULL;
return (rc ? rc : CPIOERR_ENOENT); /* XXX HACK */