libalpm: correctly log curl_download_internal return value

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
morganamilo 2024-02-03 18:09:45 +00:00 committed by Allan McRae
parent ce528a2654
commit bf76b5e89f

View file

@ -967,8 +967,9 @@ static int curl_download_internal(alpm_handle_t *handle,
} }
} }
_alpm_log(handle, ALPM_LOG_DEBUG, "curl_download_internal return code is %d\n", err); int ret = err ? -1 : updated ? 0 : 1;
return err ? -1 : updated ? 0 : 1; _alpm_log(handle, ALPM_LOG_DEBUG, "curl_download_internal return code is %d\n", ret);
return ret;
} }
#endif #endif