Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/remove.c
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-06-28 01:20:30 +0200
committerChantry Xavier <shiningxc@gmail.com>2007-06-28 01:41:15 +0200
commit3a27fbaae40869d513cf117609d3a56c07863cae (patch)
tree1fa02b4dea585dace48c691852d7442320982fe1 /lib/libalpm/remove.c
parentd821d75e255207bf84f58532e2ff65a8a2a79d42 (diff)
libalpm/remove.c : file variable used before being initialized.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Diffstat (limited to 'lib/libalpm/remove.c')
-rw-r--r--lib/libalpm/remove.c3
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;