aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sound/pcm/buffer.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2010-05-04 16:56:59 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2010-05-04 16:56:59 +0000
commitc909aebcbb2125164da7ec014ca9ec245074486f (patch)
tree6a84528f567fe97a5a799f66610367f38cee48b4 /sys/dev/sound/pcm/buffer.c
parenta7283d32132a41a985e7c92afbc81fcee183a6e5 (diff)
downloadsrc-c909aebcbb2125164da7ec014ca9ec245074486f.tar.gz
src-c909aebcbb2125164da7ec014ca9ec245074486f.zip
- Remove more dead code[1]. Since r207330, we only need to check division
by zero of the second argument 'from'. - Prefer u_int32_t over unsigned int to make its intention more clearer. - Move the function to a header file and make it a static inline function. Pointed out by: Andrew Reilly (areilly at bigpond dot net dot au)[1] MFC after: 3 days
Notes
Notes: svn path=/head/; revision=207620
Diffstat (limited to 'sys/dev/sound/pcm/buffer.c')
-rw-r--r--sys/dev/sound/pcm/buffer.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c
index a9053d751d86..687542e4a846 100644
--- a/sys/dev/sound/pcm/buffer.c
+++ b/sys/dev/sound/pcm/buffer.c
@@ -566,19 +566,6 @@ sndbuf_updateprevtotal(struct snd_dbuf *b)
}
unsigned int
-snd_xbytes(unsigned int v, unsigned int from, unsigned int to)
-{
-
- if (from == to)
- return v;
-
- if (from == 0 || to == 0 || v == 0)
- return 0;
-
- return (unsigned int)(((u_int64_t)v * to) / from);
-}
-
-unsigned int
sndbuf_xbytes(unsigned int v, struct snd_dbuf *from, struct snd_dbuf *to)
{
if (from == NULL || to == NULL || v == 0)