Skip to contentSkip to conversation

conf: fix snd_func_imul accumulator initialization

DISCUSSION GitHub pull_request - opened 1 participant 1 message Jun 14 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): alsa-project/alsa-lib/pr/[email protected]

#1 lore raw

alsa-project/alsa-lib pull request #511 was opened from orange-dot:

snd_func_iops() initialized result to 0 for both iadd and imul. For imul, every multiplication step therefore multiplied by 0, so @func imul always evaluated to 0.

Initialize the accumulator to 1 for imul, while preserving the existing 0 result for an empty integers list. Add regression coverage for iadd and imul evaluation.

Request URL : https://github.com/alsa-project/alsa-lib/pull/511
Patch URL : https://github.com/alsa-project/alsa-lib/pull/511.patch
Repository URL: https://github.com/alsa-project/alsa-lib