summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authornat <nat@NetBSD.org>2017-10-02 07:06:15 +0000
committernat <nat@NetBSD.org>2017-10-02 07:06:15 +0000
commit40f8110f4e7a288305749645a396bb35a829300f (patch)
treea16285809b151eadf03aec1de5d5c7e5d9344051 /sys/dev
parent8fccb79e868ccfeb1fb6d548c28da3eadc623f18 (diff)
Allow maxused to be an odd number of bytes. This makes single byte
conversions work for the test described in the PR. Addresses another part of PR kern/52586.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/auconv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/auconv.c b/sys/dev/auconv.c
index 5bd66678862..2338b55a9ab 100644
--- a/sys/dev/auconv.c
+++ b/sys/dev/auconv.c
@@ -1,4 +1,4 @@
-/* $NetBSD: auconv.c,v 1.32 2017/10/02 06:06:43 nat Exp $ */
+/* $NetBSD: auconv.c,v 1.33 2017/10/02 07:06:15 nat Exp $ */
/*
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auconv.c,v 1.32 2017/10/02 06:06:43 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auconv.c,v 1.33 2017/10/02 07:06:15 nat Exp $");
#include <sys/types.h>
#include <sys/audioio.h>
@@ -512,7 +512,7 @@ DEFINE_FILTER(swap_bytes_change_sign16)
valid = n_validbits / NBBY; \
target = t_prec / NBBY; \
this = (stream_filter_t *)self; \
- max_used = ((max_used / hw) * hw) & ~1; \
+ max_used = ((max_used / hw) * hw); \
\
if ((err = this->prev->fetch_to(sc, this->prev, this->src, \
max_used))) \