]> git.alsa-project.org Git - alsa-lib.git/commitdiff
simple mixer: fix compilation with gcc 2.x
authorClemens Ladisch <clemens@ladisch.de>
Tue, 16 Aug 2005 15:30:19 +0000 (15:30 +0000)
committerClemens Ladisch <clemens@ladisch.de>
Tue, 16 Aug 2005 15:30:19 +0000 (15:30 +0000)
Move a variable declaration to the top of the function for compatibility
with gcc 2.x.

src/mixer/simple_none.c

index 6fd32b21e7c8eb1904844332931cfa765df974ba..88724b2957dbcb0aed79606dfcaef186e554a365 100644 (file)
@@ -597,8 +597,8 @@ static int selem_write(snd_mixer_elem_t *elem)
 
 static void selem_free(snd_mixer_elem_t *elem)
 {
-       assert(snd_mixer_elem_get_type(elem) == SND_MIXER_ELEM_SIMPLE);
        selem_none_t *simple = snd_mixer_elem_get_private(elem);
+       assert(snd_mixer_elem_get_type(elem) == SND_MIXER_ELEM_SIMPLE);
        if (simple->selem.id)
                snd_mixer_selem_id_free(simple->selem.id);
        free(simple);