summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2009-04-04 02:59:40 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2009-04-04 02:59:40 +0000
commit05e4c6a74f1baa7ba4666e98f7324c1e6235021f (patch)
treef943e7ab1e8239fb354cb0af7f9c2193aaa55ff7
parentd603406596fcda61dd9e56cb05f99ca5238c7e3c (diff)
- make sure codec->nsense_pins is initilized to 0
- don't mix use of const and non-const pointers problem noted by Jordi Beltran Creix on tech@
-rw-r--r--sys/dev/pci/azalia.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 311fe2e0dc7..02b5fc3aa66 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.116 2009/02/05 01:25:21 oga Exp $ */
+/* $OpenBSD: azalia.c,v 1.117 2009/04/04 02:59:39 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -1260,6 +1260,7 @@ azalia_codec_init(codec_t *this)
this->speaker = -1;
this->mic = -1;
+ this->nsense_pins = 0;
FOR_EACH_WIDGET(this, i) {
err = azalia_widget_init(&this->w[i], this, i);
if (err)
@@ -2253,8 +2254,7 @@ azalia_widget_init_pin(widget_t *this, const codec_t *codec)
if (err)
return err;
if (!(CORB_CD_MISC(result) & CORB_CD_PRESENCEOV)) {
- wcodec->sense_pins[codec->nsense_pins] = this->nid;
- wcodec->nsense_pins++;
+ wcodec->sense_pins[wcodec->nsense_pins++] = this->nid;
}
}