]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Use snd_config_get_bool()
authorTakashi Iwai <tiwai@suse.de>
Thu, 13 Jan 2005 15:46:34 +0000 (15:46 +0000)
committerTakashi Iwai <tiwai@suse.de>
Thu, 13 Jan 2005 15:46:34 +0000 (15:46 +0000)
Clean up the code, using snd_config_get_bool().

src/pcm/pcm_softvol.c

index 0daec0db37b4400757c8ef45dfbb708f19aaea2d..b8f50b35ad79de8339c0011b12132dfd7932b4ad 100644 (file)
@@ -693,15 +693,8 @@ static int parse_control_id(snd_config_t *conf, snd_ctl_elem_id_t *ctl_id, int *
                        continue;
                }
                if (strcmp(id, "iface") == 0 || strcmp(id, "interface") == 0) {
-                       const char *ptr;
-                       if ((err = snd_config_get_string(n, &ptr)) < 0) {
-                               SNDERR("field %s is not a string", id);
-                               goto _err;
-                       }
-                       if ((err = snd_config_get_ctl_iface_ascii(ptr)) < 0) {
-                               SNDERR("Invalid value for '%s'", id);
+                       if ((err = snd_config_get_bool(n)) < 0)
                                goto _err;
-                       }
                        iface = err;
                        continue;
                }