lib/transaction_commit.c: CID 62716 (argument cannot be negative)
This commit is contained in:
parent
9fc6c9d70e
commit
1a19adf85c
@ -152,11 +152,12 @@ download_binpkgs(struct xbps_handle *xhp, xbps_object_iterator_t iter)
|
|||||||
xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD, 0, pkgver,
|
xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD, 0, pkgver,
|
||||||
"Downloading `%s' package (from `%s')...", pkgver, repoloc);
|
"Downloading `%s' package (from `%s')...", pkgver, repoloc);
|
||||||
if ((rv = xbps_fetch_file(xhp, file, NULL)) == -1) {
|
if ((rv = xbps_fetch_file(xhp, file, NULL)) == -1) {
|
||||||
|
rv = errno;
|
||||||
fetchstr = xbps_fetch_error_string();
|
fetchstr = xbps_fetch_error_string();
|
||||||
xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD_FAIL,
|
xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD_FAIL,
|
||||||
fetchLastErrCode != 0 ? fetchLastErrCode : errno,
|
fetchLastErrCode != 0 ? fetchLastErrCode : errno,
|
||||||
pkgver, "[trans] failed to download `%s' package from `%s': %s",
|
pkgver, "[trans] failed to download `%s' package from `%s': %s",
|
||||||
pkgver, repoloc, fetchstr ? fetchstr : strerror(errno));
|
pkgver, repoloc, fetchstr ? fetchstr : strerror(rv));
|
||||||
free(file);
|
free(file);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -173,11 +174,12 @@ download_binpkgs(struct xbps_handle *xhp, xbps_object_iterator_t iter)
|
|||||||
"Downloading `%s' signature (from `%s')...", pkgver, repoloc);
|
"Downloading `%s' signature (from `%s')...", pkgver, repoloc);
|
||||||
file = xbps_xasprintf("%s/%s.%s.xbps.sig", repoloc, pkgver, arch);
|
file = xbps_xasprintf("%s/%s.%s.xbps.sig", repoloc, pkgver, arch);
|
||||||
if ((rv = xbps_fetch_file(xhp, file, NULL)) == -1) {
|
if ((rv = xbps_fetch_file(xhp, file, NULL)) == -1) {
|
||||||
|
rv = errno;
|
||||||
fetchstr = xbps_fetch_error_string();
|
fetchstr = xbps_fetch_error_string();
|
||||||
xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD_FAIL,
|
xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD_FAIL,
|
||||||
fetchLastErrCode != 0 ? fetchLastErrCode : errno,
|
fetchLastErrCode != 0 ? fetchLastErrCode : errno,
|
||||||
pkgver, "[trans] failed to download `%s' signature from `%s': %s",
|
pkgver, "[trans] failed to download `%s' signature from `%s': %s",
|
||||||
pkgver, repoloc, fetchstr ? fetchstr : strerror(errno));
|
pkgver, repoloc, fetchstr ? fetchstr : strerror(rv));
|
||||||
free(sigfile);
|
free(sigfile);
|
||||||
free(file);
|
free(file);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user