Module Name:    src
Committed By:   nat
Date:           Mon Oct  2 07:06:15 UTC 2017

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

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/auconv.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/auconv.c
diff -u src/sys/dev/auconv.c:1.32 src/sys/dev/auconv.c:1.33
--- src/sys/dev/auconv.c:1.32	Mon Oct  2 06:06:43 2017
+++ src/sys/dev/auconv.c	Mon Oct  2 07:06:15 2017
@@ -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)))					\

Reply via email to