mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
a bunch of fixes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@10 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
edfad835cb
commit
c8cf0c1ce9
8 changed files with 28 additions and 21 deletions
|
|
@ -152,8 +152,8 @@ int idxset_put(struct idxset*s, void *p, uint32_t *index) {
|
|||
s->hash_table[h] = e;
|
||||
|
||||
/* Insert into array */
|
||||
extend_array(s, s->index);
|
||||
a = array_index(s, s->index);
|
||||
extend_array(s, e->index);
|
||||
a = array_index(s, e->index);
|
||||
assert(a && !*a);
|
||||
*a = e;
|
||||
|
||||
|
|
@ -185,6 +185,9 @@ void* idxset_get_by_index(struct idxset*s, uint32_t index) {
|
|||
if (!(a = array_index(s, index)))
|
||||
return NULL;
|
||||
|
||||
if (!*a)
|
||||
return NULL;
|
||||
|
||||
return (*a)->data;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue