aboutsummaryrefslogtreecommitdiffstats
path: root/lv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-23 13:42:39 +0200
committerDavid Robillard <d@drobilla.net>2018-09-23 13:42:39 +0200
commite9df0f8740d1b76e2a8556ba1a9128faebd49eef (patch)
tree1d088a5c2c818f2ff3e75dcbe5ed47fe4b77fdc7 /lv2
parentcdf5e54b396d6a4fbe9abb14fd31a050719f66ba (diff)
downloadlv2-e9df0f8740d1b76e2a8556ba1a9128faebd49eef.tar.xz
Add missing braces
Diffstat (limited to 'lv2')
-rw-r--r--lv2/event/event-helpers.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/lv2/event/event-helpers.h b/lv2/event/event-helpers.h
index 31323f5..eaac287 100644
--- a/lv2/event/event-helpers.h
+++ b/lv2/event/event-helpers.h
@@ -153,8 +153,9 @@ lv2_event_get(LV2_Event_Iterator* iter,
LV2_Event* const ev = (LV2_Event*)(iter->buf->data + iter->offset);
- if (data)
+ if (data) {
*data = (uint8_t*)ev + sizeof(LV2_Event);
+ }
return ev;
}
@@ -173,11 +174,13 @@ lv2_event_write(LV2_Event_Iterator* iter,
uint16_t size,
const uint8_t* data)
{
- if (!iter->buf)
+ if (!iter->buf) {
return false;
+ }
- if (iter->buf->capacity - iter->buf->size < sizeof(LV2_Event) + size)
+ if (iter->buf->capacity - iter->buf->size < sizeof(LV2_Event) + size) {
return false;
+ }
LV2_Event* const ev = (LV2_Event*)(iter->buf->data + iter->offset);
@@ -207,8 +210,9 @@ lv2_event_reserve(LV2_Event_Iterator* iter,
uint16_t size)
{
const uint16_t total_size = (uint16_t)(sizeof(LV2_Event) + size);
- if (iter->buf->capacity - iter->buf->size < total_size)
+ if (iter->buf->capacity - iter->buf->size < total_size) {
return NULL;
+ }
LV2_Event* const ev = (LV2_Event*)(iter->buf->data + iter->offset);
@@ -237,8 +241,9 @@ lv2_event_write_event(LV2_Event_Iterator* iter,
const uint8_t* data)
{
const uint16_t total_size = (uint16_t)(sizeof(LV2_Event) + ev->size);
- if (iter->buf->capacity - iter->buf->size < total_size)
+ if (iter->buf->capacity - iter->buf->size < total_size) {
return false;
+ }
LV2_Event* const write_ev = (LV2_Event*)(iter->buf->data + iter->offset);