diff --git a/src/device.c b/src/device.c index 75ea59ff4..501ae6b64 100644 --- a/src/device.c +++ b/src/device.c @@ -343,6 +343,7 @@ int device_has_config(const device_t *d) { int c = 0; + device_config_t *config; if (d == NULL) return 0; @@ -350,7 +351,7 @@ device_has_config(const device_t *d) if (d->config == NULL) return 0; - config = d->config; + config = (device_config_t *) d->config; while (config->type != -1) { if (config->type != CONFIG_MAC) diff --git a/src/sound/sound.c b/src/sound/sound.c index 5a3e978f6..5110b9c59 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -186,7 +186,7 @@ sound_card_has_config(int card) { if (!sound_cards[card].device) return 0; - return sound_cards[card].device->config ? 1 : 0; + return device_has_config(sound_cards[card].device) ? 1 : 0; } char *