pcm: fix leading space in snd_pcm_hw_param_dump for mask parameters

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2026-05-28 11:37:05 +02:00
parent 58e4aa3e33
commit 3c060c978a

View file

@ -1230,6 +1230,7 @@ void snd_pcm_hw_param_dump(const snd_pcm_hw_params_t *params,
snd_output_puts(out, "ALL"); snd_output_puts(out, "ALL");
else { else {
unsigned int k; unsigned int k;
int sep = 0;
for (k = 0; k <= SND_MASK_MAX; ++k) { for (k = 0; k <= SND_MASK_MAX; ++k) {
if (snd_mask_test(mask, k)) { if (snd_mask_test(mask, k)) {
const char *s; const char *s;
@ -1248,8 +1249,10 @@ void snd_pcm_hw_param_dump(const snd_pcm_hw_params_t *params,
s = NULL; s = NULL;
} }
if (s) { if (s) {
if (sep)
snd_output_putc(out, ' '); snd_output_putc(out, ' ');
snd_output_puts(out, s); snd_output_puts(out, s);
sep = 1;
} }
} }
} }