hdspmixer: Beautification; Lower nesting depth

Exit the loop if card < 0. No need to nest the actual code in the else
branch.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Adrian Knoth 2011-02-03 22:43:36 +01:00 committed by Takashi Iwai
parent 4c63a6b7be
commit 5d4bcc44ce

View file

@ -49,44 +49,44 @@ int main(int argc, char **argv)
while (snd_card_next(&card) >= 0) { while (snd_card_next(&card) >= 0) {
if (card < 0) { if (card < 0) {
break; break;
} else { }
snd_card_get_longname(card, &name);
printf("Card %d : %s\n", card, name); snd_card_get_longname(card, &name);
if (!strncmp(name, "RME Hammerfall DSP + Multiface", 30)) { printf("Card %d : %s\n", card, name);
printf("Multiface found !\n"); if (!strncmp(name, "RME Hammerfall DSP + Multiface", 30)) {
hdsp_cards[cards] = new HDSPMixerCard(Multiface, card); printf("Multiface found !\n");
cards++; hdsp_cards[cards] = new HDSPMixerCard(Multiface, card);
} else if (!strncmp(name, "RME Hammerfall DSP + Digiface", 29)) { cards++;
printf("Digiface found !\n"); } else if (!strncmp(name, "RME Hammerfall DSP + Digiface", 29)) {
hdsp_cards[cards] = new HDSPMixerCard(Digiface, card); printf("Digiface found !\n");
cards++; hdsp_cards[cards] = new HDSPMixerCard(Digiface, card);
} else if (!strncmp(name, "RME Hammerfall HDSP 9652", 24)) { cards++;
printf("HDSP 9652 found !\n"); } else if (!strncmp(name, "RME Hammerfall HDSP 9652", 24)) {
hdsp_cards[cards] = new HDSPMixerCard(H9652, card); printf("HDSP 9652 found !\n");
cards++; hdsp_cards[cards] = new HDSPMixerCard(H9652, card);
} else if (!strncmp(name, "RME Hammerfall HDSP 9632", 24)) { cards++;
printf("HDSP 9632 found !\n"); } else if (!strncmp(name, "RME Hammerfall HDSP 9632", 24)) {
hdsp_cards[cards] = new HDSPMixerCard(H9632, card); printf("HDSP 9632 found !\n");
cards++; hdsp_cards[cards] = new HDSPMixerCard(H9632, card);
} else if (!strncmp(name, "RME MADIface", 12)) { cards++;
printf("RME MADIface found !\n"); } else if (!strncmp(name, "RME MADIface", 12)) {
hdsp_cards[cards] = new HDSPMixerCard(HDSPeMADI, card); printf("RME MADIface found !\n");
cards++; hdsp_cards[cards] = new HDSPMixerCard(HDSPeMADI, card);
} else if (!strncmp(name, "RME MADI", 8)) { cards++;
printf("RME MADI found !\n"); } else if (!strncmp(name, "RME MADI", 8)) {
hdsp_cards[cards] = new HDSPMixerCard(HDSPeMADI, card); printf("RME MADI found !\n");
cards++; hdsp_cards[cards] = new HDSPMixerCard(HDSPeMADI, card);
} else if (!strncmp(name, "RME RayDAT", 10)) { cards++;
printf("RME RayDAT found !\n"); } else if (!strncmp(name, "RME RayDAT", 10)) {
hdsp_cards[cards] = new HDSPMixerCard(HDSPeRayDAT, card); printf("RME RayDAT found !\n");
cards++; hdsp_cards[cards] = new HDSPMixerCard(HDSPeRayDAT, card);
} else if (!strncmp(name, "RME AIO", 7)) { cards++;
printf("RME AIO found !\n"); } else if (!strncmp(name, "RME AIO", 7)) {
hdsp_cards[cards] = new HDSPMixerCard(HDSPeAIO, card); printf("RME AIO found !\n");
cards++; hdsp_cards[cards] = new HDSPMixerCard(HDSPeAIO, card);
} else if (!strncmp(name, "RME Hammerfall DSP", 18)) { cards++;
printf("Uninitialized HDSP card found.\nUse hdsploader to upload configuration data to the card.\n"); } else if (!strncmp(name, "RME Hammerfall DSP", 18)) {
} printf("Uninitialized HDSP card found.\nUse hdsploader to upload configuration data to the card.\n");
} }
} }