summaryrefslogtreecommitdiffstats
path: root/app/ring.c
diff options
context:
space:
mode:
authorroot <root@lamia.panaceas.james.local>2015-06-07 01:34:12 +0100
committerroot <root@lamia.panaceas.james.local>2015-06-07 01:34:12 +0100
commit3accd8fcee87299b51de0abde3c8d9c83368d871 (patch)
tree0381019b06130ad1089ddc148d01a43163fc7978 /app/ring.c
parent43443ee9ba206b0963c49123bd03c250ed8e7b26 (diff)
downloadtims_keyboard-3accd8fcee87299b51de0abde3c8d9c83368d871.tar.gz
tims_keyboard-3accd8fcee87299b51de0abde3c8d9c83368d871.tar.bz2
tims_keyboard-3accd8fcee87299b51de0abde3c8d9c83368d871.zip
tidyup
Diffstat (limited to 'app/ring.c')
-rw-r--r--app/ring.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/app/ring.c b/app/ring.c
index 8f13567..db9401a 100644
--- a/app/ring.c
+++ b/app/ring.c
@@ -54,13 +54,16 @@ ring_write (volatile ring_t * r, uint8_t * buf, size_t len, int blocking)
{
while (len--)
{
- if (blocking) {
- while (ring_write_byte (r, *buf));
- buf++;
- } else {
- if (ring_write_byte (r, *(buf++)))
- return -EAGAIN;
- }
+ if (blocking)
+ {
+ while (ring_write_byte (r, *buf));
+ buf++;
+ }
+ else
+ {
+ if (ring_write_byte (r, *(buf++)))
+ return -EAGAIN;
+ }
}
return 0;