1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

libalpm/remove.c : file variable used before being initialized.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
This commit is contained in:
Chantry Xavier 2007-06-28 01:20:30 +02:00
parent d821d75e25
commit 3a27fbaae4

View File

@ -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;