From: ratchov Date: Tue, 31 Dec 2013 12:24:55 +0000 (+0000) Subject: round client block size to nearest possble X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fd3cf84a9d478368611c9617594fec66cf754f54;p=openbsd round client block size to nearest possble --- diff --git a/usr.bin/sndiod/sock.c b/usr.bin/sndiod/sock.c index a552190795a..62c3c96b186 100644 --- a/usr.bin/sndiod/sock.c +++ b/usr.bin/sndiod/sock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sock.c,v 1.7 2013/11/18 17:37:45 ratchov Exp $ */ +/* $OpenBSD: sock.c,v 1.8 2013/12/31 12:24:55 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * @@ -767,7 +767,7 @@ sock_setpar(struct sock *f) max = 1 + rate / d->round; min *= s->round; max *= s->round; - appbufsz += s->round - 1; + appbufsz += s->round / 2; appbufsz -= appbufsz % s->round; if (appbufsz < min) appbufsz = min;