Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145327655
D53526.id165717.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
447 B
Referenced Files
None
Subscribers
None
D53526.id165717.diff
View Options
diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c
--- a/sys/dev/sound/pcm/buffer.c
+++ b/sys/dev/sound/pcm/buffer.c
@@ -280,16 +280,10 @@
length = b->bufsize;
data = sndbuf_zerodata(b->fmt);
-
i = sndbuf_getfreeptr(b);
p = sndbuf_getbuf(b);
- while (length > 0) {
- p[i] = data;
- length--;
- i++;
- if (i >= b->bufsize)
- i = 0;
- }
+ for (; length > 0; length--, i++)
+ p[i % b->bufsize] = data;
}
/**
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 19, 11:22 AM (8 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28876685
Default Alt Text
D53526.id165717.diff (447 B)
Attached To
Mode
D53526: sound: Simplify sndbuf_clear() loop
Attached
Detach File
Event Timeline
Log In to Comment