Module Name:    src
Committed By:   isaki
Date:           Sat Jul 29 06:00:47 UTC 2017

Modified Files:
        src/sys/dev: audio.c

Log Message:
0 -> NULL in audioattach()


To generate a diff of this commit:
cvs rdiff -u -r1.377 -r1.378 src/sys/dev/audio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/audio.c
diff -u src/sys/dev/audio.c:1.377 src/sys/dev/audio.c:1.378
--- src/sys/dev/audio.c:1.377	Sat Jul 29 05:55:58 2017
+++ src/sys/dev/audio.c	Sat Jul 29 06:00:47 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.377 2017/07/29 05:55:58 isaki Exp $	*/
+/*	$NetBSD: audio.c,v 1.378 2017/07/29 06:00:47 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <nathanialsl...@yahoo.com.au>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.377 2017/07/29 05:55:58 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.378 2017/07/29 06:00:47 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -537,7 +537,7 @@ audioattach(device_t parent, device_t se
 	cv_init(&sc->sc_condvar,"play");
 	cv_init(&sc->sc_rcondvar,"record");
 
-	if (hwp == 0 || hwp->get_locks == 0) {
+	if (hwp == NULL || hwp->get_locks == NULL) {
 		aprint_error(": missing method\n");
 		panic("audioattach");
 	}
@@ -545,17 +545,17 @@ audioattach(device_t parent, device_t se
 	hwp->get_locks(hdlp, &sc->sc_intr_lock, &sc->sc_lock);
 
 #ifdef DIAGNOSTIC
-	if (hwp->query_encoding == 0 ||
-	    hwp->set_params == 0 ||
-	    (hwp->start_output == 0 && hwp->trigger_output == 0) ||
-	    (hwp->start_input == 0 && hwp->trigger_input == 0) ||
-	    hwp->halt_output == 0 ||
-	    hwp->halt_input == 0 ||
-	    hwp->getdev == 0 ||
-	    hwp->set_port == 0 ||
-	    hwp->get_port == 0 ||
-	    hwp->query_devinfo == 0 ||
-	    hwp->get_props == 0) {
+	if (hwp->query_encoding == NULL ||
+	    hwp->set_params == NULL ||
+	    (hwp->start_output == NULL && hwp->trigger_output == NULL) ||
+	    (hwp->start_input == NULL && hwp->trigger_input == NULL) ||
+	    hwp->halt_output == NULL ||
+	    hwp->halt_input == NULL ||
+	    hwp->getdev == NULL ||
+	    hwp->set_port == NULL ||
+	    hwp->get_port == NULL ||
+	    hwp->query_devinfo == NULL ||
+	    hwp->get_props == NULL) {
 		aprint_error(": missing method\n");
 		sc->hw_if = NULL;
 		return;

Reply via email to