diff options
author | Chantry Xavier <shiningxc@gmail.com> | 2007-06-28 01:20:30 +0200 |
---|---|---|
committer | Chantry Xavier <shiningxc@gmail.com> | 2007-06-28 01:41:15 +0200 |
commit | 3a27fbaae40869d513cf117609d3a56c07863cae (patch) | |
tree | 1fa02b4dea585dace48c691852d7442320982fe1 /lib/libalpm | |
parent | d821d75e255207bf84f58532e2ff65a8a2a79d42 (diff) | |
download | pacman-3a27fbaae40869d513cf117609d3a56c07863cae.tar.gz pacman-3a27fbaae40869d513cf117609d3a56c07863cae.tar.xz |
libalpm/remove.c : file variable used before being initialized.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/remove.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |