if (fsm->failedFile)
*fsm->failedFile = NULL;
- memset(fsm->sufbuf, 0, sizeof(fsm->sufbuf));
if (fsm->goal == FSM_PKGINSTALL) {
- sprintf(fsm->sufbuf, ";%08x", (unsigned)rpmtsGetTid(ts));
+ rasprintf(&fsm->suffix, ";%08x", (unsigned)rpmtsGetTid(ts));
}
ec = fsm->rc = 0;
fsm->failedFile = NULL;
fsm->path = _free(fsm->path);
+ fsm->suffix = _free(fsm->suffix);
while ((fsm->li = fsm->links) != NULL) {
fsm->links = fsm->li->next;
fsm->li->next = NULL;
fsm->postpone = 0;
fsm->diskchecked = fsm->exists = 0;
fsm->subdir = NULL;
- fsm->suffix = (fsm->sufbuf[0] != '\0' ? fsm->sufbuf : NULL);
fsm->action = FA_UNKNOWN;
fsm->osuffix = NULL;
fsm->nsuffix = NULL;
break;
if (fsm->goal == FSM_PKGINSTALL) {
/* XXX only erase if temp fn w suffix is in use */
- if (fsm->sufbuf[0] != '\0') {
+ if (fsm->suffix) {
if (S_ISDIR(st->st_mode)) {
(void) fsmRmdir(fsm);
} else {
const char * subdir; /*!< Current file sub-directory. */
const char * osuffix; /*!< Old, preserved, file suffix. */
const char * nsuffix; /*!< New, created, file suffix. */
- const char * suffix; /*!< Current file suffix. */
- char sufbuf[64]; /* XXX eliminate */
+ char * suffix; /*!< Current file suffix. */
int postpone; /*!< Skip remaining stages? */
int diskchecked; /*!< Has stat(2) been performed? */
int exists; /*!< Does current file exist on disk? */