lib/transaction_files.c: fix undefined behaviour
This commit is contained in:
parent
f45c6798c9
commit
0efb59a979
@ -365,7 +365,6 @@ collect_file(struct xbps_handle *xhp, const char *file, size_t size,
|
|||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
item->deleted = false;
|
item->deleted = false;
|
||||||
goto add;
|
goto add;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (remove) {
|
if (remove) {
|
||||||
@ -656,7 +655,6 @@ xbps_transaction_files(struct xbps_handle *xhp, xbps_object_iterator_t iter)
|
|||||||
xbps_dictionary_t pkgd, filesd;
|
xbps_dictionary_t pkgd, filesd;
|
||||||
xbps_object_t obj;
|
xbps_object_t obj;
|
||||||
const char *trans, *pkgver;
|
const char *trans, *pkgver;
|
||||||
bool preserve;
|
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
unsigned int idx = 0;
|
unsigned int idx = 0;
|
||||||
|
|
||||||
@ -710,6 +708,7 @@ xbps_transaction_files(struct xbps_handle *xhp, xbps_object_iterator_t iter)
|
|||||||
pkgd = xbps_pkgdb_get_pkg(xhp, pkgname);
|
pkgd = xbps_pkgdb_get_pkg(xhp, pkgname);
|
||||||
if (pkgd) {
|
if (pkgd) {
|
||||||
const char *oldpkgver;
|
const char *oldpkgver;
|
||||||
|
bool preserve = false;
|
||||||
xbps_dictionary_get_cstring_nocopy(pkgd, "pkgver", &oldpkgver);
|
xbps_dictionary_get_cstring_nocopy(pkgd, "pkgver", &oldpkgver);
|
||||||
xbps_dictionary_get_bool(obj, "preserve", &preserve);
|
xbps_dictionary_get_bool(obj, "preserve", &preserve);
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user