Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Remove dead codes. chan will never be NULL in SIMPLE...
details: https://anonhg.NetBSD.org/src/rev/a462386335ac
branches: trunk
changeset: 355652:a462386335ac
user: isaki <isaki%NetBSD.org@localhost>
date: Tue Aug 08 05:58:12 2017 +0000
description:
Remove dead codes. chan will never be NULL in SIMPLEQ_FOREACH.
diffstat:
sys/dev/audio.c | 16 ++--------------
1 files changed, 2 insertions(+), 14 deletions(-)
diffs (58 lines):
diff -r 75a6cc10cd24 -r a462386335ac sys/dev/audio.c
--- a/sys/dev/audio.c Tue Aug 08 05:54:14 2017 +0000
+++ b/sys/dev/audio.c Tue Aug 08 05:58:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.390 2017/08/08 05:54:14 isaki Exp $ */
+/* $NetBSD: audio.c,v 1.391 2017/08/08 05:58:12 isaki Exp $ */
/*-
* Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.390 2017/08/08 05:54:14 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.391 2017/08/08 05:58:12 isaki Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -927,9 +927,6 @@
/* free resources */
SIMPLEQ_FOREACH(chan, &sc->sc_audiochan, entries) {
- if (chan == NULL)
- break;
-
if (chan->chan == MIXER_INUSE)
continue;
audio_free_ring(sc, &chan->vc->sc_mpr);
@@ -938,9 +935,6 @@
audio_free_ring(sc, &sc->sc_pr);
audio_free_ring(sc, &sc->sc_rr);
SIMPLEQ_FOREACH(chan, &sc->sc_audiochan, entries) {
- if (chan == NULL)
- break;
-
if (chan->chan == MIXER_INUSE)
continue;
audio_destroy_pfilters(chan->vc);
@@ -3710,9 +3704,6 @@
if (!sc->sc_opens)
break; /* ignore interrupt if not open */
- if (chan == NULL)
- break;
-
if (chan == SIMPLEQ_FIRST(&sc->sc_audiochan))
continue;
@@ -3927,9 +3918,6 @@
if (!sc->sc_opens)
break; /* ignore interrupt if not open */
- if (chan == NULL)
- break;
-
if (chan == SIMPLEQ_FIRST(&sc->sc_audiochan))
continue;
Home |
Main Index |
Thread Index |
Old Index