Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci comparision with a string literal by "==" can't ...



details:   https://anonhg.NetBSD.org/src/rev/015cd078666d
branches:  trunk
changeset: 746689:015cd078666d
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Aug 18 11:12:05 2009 +0000

description:
comparision with a string literal by "==" can't work (found by gcc-4.4.1),
replace with strcmp()

diffstat:

 sys/dev/pci/sv.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 22d4f30779ee -r 015cd078666d sys/dev/pci/sv.c
--- a/sys/dev/pci/sv.c  Tue Aug 18 11:08:37 2009 +0000
+++ b/sys/dev/pci/sv.c  Tue Aug 18 11:12:05 2009 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: sv.c,v 1.42 2009/05/12 08:23:01 cegger Exp $ */
+/*      $NetBSD: sv.c,v 1.43 2009/08/18 11:12:05 drochner Exp $ */
 /*      $OpenBSD: sv.c,v 1.2 1998/07/13 01:50:15 csapuntz Exp $ */
 
 /*
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.42 2009/05/12 08:23:01 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.43 2009/08/18 11:12:05 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1358,7 +1358,7 @@
        sv_mixer_set_port(sc, &cp);
 
        for (i = 0; i < ARRAY_SIZE(ports); i++) {
-               if (ports[i].audio == AudioNdac) {
+               if (!strcmp(ports[i].audio, AudioNdac)) {
                        cp.type = AUDIO_MIXER_ENUM;
                        cp.dev = SV_FIRST_MIXER + i * SV_DEVICES_PER_PORT + 1;
                        cp.un.ord = 0;



Home | Main Index | Thread Index | Old Index