From 3a27fbaae40869d513cf117609d3a56c07863cae Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Thu, 28 Jun 2007 01:20:30 +0200 Subject: libalpm/remove.c : file variable used before being initialized. Signed-off-by: Chantry Xavier --- lib/libalpm/remove.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 74d95393..cc3afeb7 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -206,6 +206,8 @@ static void unlink_file(pmpkg_t *info, alpm_list_t *lp, alpm_list_t *targ, FREE(hash); } + snprintf(file, PATH_MAX, "%s%s", handle->root, (char *)lp->data); + if(trans->type == PM_TRANS_TYPE_UPGRADE) { /* check noupgrade */ if(alpm_list_find_str(handle->noupgrade, lp->data)) { @@ -214,7 +216,6 @@ static void unlink_file(pmpkg_t *info, alpm_list_t *lp, alpm_list_t *targ, } } - snprintf(file, PATH_MAX, "%s%s", handle->root, (char *)lp->data); if(lstat(file, &buf)) { _alpm_log(PM_LOG_DEBUG, _("file %s does not exist"), file); return; -- cgit v1.2.3-70-g09d2