round buffer size to nearest possible value

This commit is contained in:
Alexandre Ratchov 2013-12-31 13:13:04 +01:00
parent a49e6f5991
commit 65c99cf7c3
1 changed files with 1 additions and 1 deletions

View File

@ -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;