summaryrefslogtreecommitdiff
path: root/lib/fsm.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-12-16 10:09:26 +0200
committerPanu Matilainen <pmatilai@redhat.com>2009-12-16 10:09:26 +0200
commitee8d3dfa923536bbd559fefb3d3c137a16dcf764 (patch)
tree53fe722aafa133ca79f24b822443c39dda1b1157 /lib/fsm.c
parentb22c266003bdd4dd4067ea6ec77bec5cee24d12b (diff)
downloadrpm-ee8d3dfa923536bbd559fefb3d3c137a16dcf764.tar.gz
rpm-ee8d3dfa923536bbd559fefb3d3c137a16dcf764.tar.bz2
rpm-ee8d3dfa923536bbd559fefb3d3c137a16dcf764.zip
Remove now unnecessary const-avoidance construct
Diffstat (limited to 'lib/fsm.c')
-rw-r--r--lib/fsm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/fsm.c b/lib/fsm.c
index b0f951bac..498aed4dc 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -861,11 +861,8 @@ static int writeFile(FSM_t fsm, int writeData)
}
if (fsm->mapFlags & CPIO_MAP_ABSOLUTE) {
- char *p = NULL;
- if (fsm->mapFlags & CPIO_MAP_ADDDOT)
- rstrcat(&p, ".");
- rstrscat(&fsm->path, fsm->dirName, fsm->baseName, NULL);
- fsm->path = p;
+ fsm->path = rstrscat(NULL, (fsm->mapFlags & CPIO_MAP_ADDDOT) ? "." : "",
+ fsm->dirName, fsm->baseName, NULL);
} else if (fsm->mapFlags & CPIO_MAP_PATH) {
rpmfi fi = fsmGetFi(fsm);
fsm->path = xstrdup((fi->apath ? fi->apath[fsm->ix] + fi->striplen :