svn commit: r213779 - head/sys/dev/sound/pci

Rui Paulo rpaulo at FreeBSD.org
Wed Oct 13 14:39:54 UTC 2010


Author: rpaulo
Date: Wed Oct 13 14:39:54 2010
New Revision: 213779
URL: http://svn.freebsd.org/changeset/base/213779

Log:
  Fix a brain-o: wrong case statement semantics.
  
  Found with:	clang

Modified:
  head/sys/dev/sound/pci/envy24ht.c
  head/sys/dev/sound/pci/spicds.c

Modified: head/sys/dev/sound/pci/envy24ht.c
==============================================================================
--- head/sys/dev/sound/pci/envy24ht.c	Wed Oct 13 14:37:52 2010	(r213778)
+++ head/sys/dev/sound/pci/envy24ht.c	Wed Oct 13 14:39:54 2010	(r213779)
@@ -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;

Modified: head/sys/dev/sound/pci/spicds.c
==============================================================================
--- head/sys/dev/sound/pci/spicds.c	Wed Oct 13 14:37:52 2010	(r213778)
+++ head/sys/dev/sound/pci/spicds.c	Wed Oct 13 14:39:54 2010	(r213779)
@@ -283,7 +283,8 @@ spicds_set(struct spicds_info *codec, in
 		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:


More information about the svn-src-head mailing list