mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
One more fixes to sorting
This commit is contained in:
parent
e02f9a9650
commit
b260b72fc9
2 changed files with 4 additions and 4 deletions
|
|
@ -147,10 +147,10 @@ static int snd_hctl_elem_add(snd_hctl_t *hctl, snd_hctl_elem_t *elem)
|
|||
idx = _snd_hctl_find_elem(hctl, &elem->id, &dir);
|
||||
assert(dir != 0);
|
||||
if (dir > 0) {
|
||||
list_add(&elem->list, &hctl->pelems[idx]->list);
|
||||
list_add_tail(&elem->list, &hctl->pelems[idx]->list);
|
||||
idx++;
|
||||
} else {
|
||||
list_add_tail(&elem->list, &hctl->pelems[idx]->list);
|
||||
list_add(&elem->list, &hctl->pelems[idx]->list);
|
||||
}
|
||||
memmove(hctl->pelems + idx + 1,
|
||||
hctl->pelems + idx,
|
||||
|
|
|
|||
|
|
@ -267,10 +267,10 @@ int snd_mixer_elem_add(snd_mixer_elem_t *elem, snd_mixer_class_t *class)
|
|||
idx = _snd_mixer_find_elem(mixer, elem, &dir);
|
||||
assert(dir != 0);
|
||||
if (dir > 0) {
|
||||
list_add(&elem->list, &mixer->pelems[idx]->list);
|
||||
list_add_tail(&elem->list, &mixer->pelems[idx]->list);
|
||||
idx++;
|
||||
} else {
|
||||
list_add_tail(&elem->list, &mixer->pelems[idx]->list);
|
||||
list_add(&elem->list, &mixer->pelems[idx]->list);
|
||||
}
|
||||
memmove(mixer->pelems + idx + 1,
|
||||
mixer->pelems + idx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue