From 0e6408c2a9c9680b98ac6728edd434d087a339dd Mon Sep 17 00:00:00 2001 From: skrll Date: Fri, 4 Jul 2008 11:18:02 +0000 Subject: [PATCH] Pull in harmony_round_buffersize fix from OpenBSD. --- sys/arch/hp700/gsc/harmony.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/hp700/gsc/harmony.c b/sys/arch/hp700/gsc/harmony.c index 31a1f8f9412e..0b816bf7cd1a 100644 --- a/sys/arch/hp700/gsc/harmony.c +++ b/sys/arch/hp700/gsc/harmony.c @@ -1,4 +1,4 @@ -/* $NetBSD: harmony.c,v 1.11 2008/07/04 11:14:19 skrll Exp $ */ +/* $NetBSD: harmony.c,v 1.12 2008/07/04 11:18:02 skrll Exp $ */ /* $OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $ */ @@ -1069,7 +1069,7 @@ size_t harmony_round_buffersize(void *vsc, int direction, size_t size) { - return (size & (size_t)(-HARMONY_BUFSIZE)); + return ((size + HARMONY_BUFSIZE - 1) & (size_t)(-HARMONY_BUFSIZE)); } int