diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2007-10-19 09:03:06 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2007-10-19 09:03:06 +0000 |
commit | 9307e5132f6a7f30ceebced7f49f97de5f741359 (patch) | |
tree | 3751bcc481bc588c43cd094406330628e5e132e4 /regress | |
parent | 8ca439efa33d917ae3df2d7334ac335e1cb82387 (diff) |
fix off by ones in the AUDIO_GET[PR]RINFO tests
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/dev/audio_rw/audiotest_rw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/regress/sys/dev/audio_rw/audiotest_rw.c b/regress/sys/dev/audio_rw/audiotest_rw.c index cae1abeae91..a175f262a68 100644 --- a/regress/sys/dev/audio_rw/audiotest_rw.c +++ b/regress/sys/dev/audio_rw/audiotest_rw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audiotest_rw.c,v 1.7 2007/10/03 21:49:13 jakemsr Exp $ */ +/* $OpenBSD: audiotest_rw.c,v 1.8 2007/10/19 09:03:05 jakemsr Exp $ */ /* * Copyright (c) 2007 Jacob Meuser <jakemsr@sdf.lonestar.org> @@ -289,7 +289,7 @@ retry: warn("AUDIO_GETRRINFO"); return 0; } - if (ab.seek > buffer_size) + if (ab.seek >= buffer_size) ret |= 1; } if (mode & AUMODE_PLAY) { @@ -297,7 +297,7 @@ retry: warn("AUDIO_GETPRINFO"); return 0; } - if (ab.hiwat * ab.blksize - ab.seek > buffer_size) + if (ab.hiwat * ab.blksize - ab.seek >= buffer_size) ret |= 2; } if (ret == 0) { |