From: Jaroslav Kysela Date: Fri, 1 Dec 2000 12:58:34 +0000 (+0000) Subject: Replaced SND_CARDS with constant. X-Git-Tag: v1.0.3~1064 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=22ff96036a78e8a5855d7b829ed8a17f2ecaebfa;p=alsa-lib.git Replaced SND_CARDS with constant. --- diff --git a/src/control/control_hw.c b/src/control/control_hw.c index 5f5166b5..abc00106 100644 --- a/src/control/control_hw.c +++ b/src/control/control_hw.c @@ -192,7 +192,7 @@ int snd_ctl_hw_open(snd_ctl_t **handle, char *name, int card) *handle = NULL; - assert(card >= 0 && card < SND_CARDS); + assert(card >= 0 && card < 32); sprintf(filename, SND_FILE_CONTROL, card); if ((fd = open(filename, O_RDWR)) < 0) { snd_card_load(card); diff --git a/src/hwdep/hwdep.c b/src/hwdep/hwdep.c index d8e428f9..aa35765a 100644 --- a/src/hwdep/hwdep.c +++ b/src/hwdep/hwdep.c @@ -46,7 +46,7 @@ int snd_hwdep_open(snd_hwdep_t **handle, int card, int device, int mode) *handle = NULL; - if (card < 0 || card >= SND_CARDS) + if (card < 0 || card >= 32) return -EINVAL; sprintf(filename, SND_FILE_HWDEP, card, device); if ((fd = open(filename, mode)) < 0) { diff --git a/src/rawmidi/rawmidi_hw.c b/src/rawmidi/rawmidi_hw.c index 4ebe70a4..8a2590c6 100644 --- a/src/rawmidi/rawmidi_hw.c +++ b/src/rawmidi/rawmidi_hw.c @@ -166,7 +166,7 @@ int snd_rawmidi_hw_open(snd_rawmidi_t **handlep, char *name, int card, int devic *handlep = NULL; - assert(card >= 0 && card < SND_CARDS); + assert(card >= 0 && card < 32); if ((ret = snd_ctl_hw_open(&ctl, NULL, card)) < 0) return ret;