From 577fedb6b136a2196e6268df72c817c299f23d8e Mon Sep 17 00:00:00 2001 From: Rui Paulo Date: Wed, 13 Oct 2010 14:39:54 +0000 Subject: [PATCH] Fix a brain-o: wrong case statement semantics. Found with: clang --- sys/dev/sound/pci/envy24ht.c | 3 ++- sys/dev/sound/pci/spicds.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c index 7c1874b63d47..0358625115c5 100644 --- a/sys/dev/sound/pci/envy24ht.c +++ b/sys/dev/sound/pci/envy24ht.c @@ -2236,7 +2236,8 @@ envy24ht_putcfg(struct sc_info *sc) else printf("not implemented\n"); switch (sc->adcn) { - case 0x01 || 0x02: + case 0x01: + case 0x02: printf(" ADC #: "); printf("%d\n", sc->adcn); break; diff --git a/sys/dev/sound/pci/spicds.c b/sys/dev/sound/pci/spicds.c index 78d9374b8fe2..3a4002c81b37 100644 --- a/sys/dev/sound/pci/spicds.c +++ b/sys/dev/sound/pci/spicds.c @@ -283,7 +283,8 @@ spicds_set(struct spicds_info *codec, int dir, unsigned int left, unsigned int r case SPICDS_TYPE_WM8770: left = left + 27; break; - case SPICDS_TYPE_AK4381 || SPICDS_TYPE_AK4396: + case SPICDS_TYPE_AK4381: + case SPICDS_TYPE_AK4396: left = left * 255 / 100; break; default: