Initialise callback event fields
While the event is already globally initialised, initialising the fields
prevents a valgrind warning (since the gcc-15 update).
Signed-off-by: Allan McRae <allan@archlinux.org>
(cherry picked from commit 0d37c1daa0
)
This commit is contained in:
parent
c685ae6412
commit
1f38429b1c
2 changed files with 3 additions and 0 deletions
|
@ -1359,6 +1359,7 @@ int SYMEXPORT alpm_fetch_pkgurl(alpm_handle_t *handle, const alpm_list_t *urls,
|
|||
if(payloads) {
|
||||
event.type = ALPM_EVENT_PKG_RETRIEVE_START;
|
||||
event.pkg_retrieve.num = alpm_list_count(payloads);
|
||||
event.pkg_retrieve.total_size = 0;
|
||||
EVENT(handle, &event);
|
||||
if(_alpm_download(handle, payloads, cachedir, temporary_cachedir) == -1) {
|
||||
_alpm_log(handle, ALPM_LOG_WARNING, _("failed to retrieve some files\n"));
|
||||
|
|
|
@ -817,6 +817,8 @@ static int download_files(alpm_handle_t *handle)
|
|||
}
|
||||
|
||||
event.type = ALPM_EVENT_PKG_RETRIEVE_START;
|
||||
event.pkg_retrieve.total_size = 0;
|
||||
event.pkg_retrieve.num = 0;
|
||||
|
||||
/* sum up the number of packages to download and its total size */
|
||||
for(i = files; i; i = i->next) {
|
||||
|
|
Loading…
Add table
Reference in a new issue