From ad2bddcbee17a637a73d24ede3ecffde8d499b62 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 6 Nov 2011 19:56:38 +0000 Subject: Lint. --- ext/event.lv2/event-helpers.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ext/event.lv2') diff --git a/ext/event.lv2/event-helpers.h b/ext/event.lv2/event-helpers.h index d97ae73..75ba14b 100644 --- a/ext/event.lv2/event-helpers.h +++ b/ext/event.lv2/event-helpers.h @@ -51,7 +51,9 @@ lv2_event_pad_size(uint16_t size) * The contents of buf are ignored entirely and overwritten, except capacity * which is unmodified. */ static inline void -lv2_event_buffer_reset(LV2_Event_Buffer* buf, uint16_t stamp_type, uint8_t *data) +lv2_event_buffer_reset(LV2_Event_Buffer* buf, + uint16_t stamp_type, + uint8_t *data) { buf->data = data; buf->header_size = sizeof(LV2_Event_Buffer); @@ -65,7 +67,8 @@ lv2_event_buffer_reset(LV2_Event_Buffer* buf, uint16_t stamp_type, uint8_t *data static inline LV2_Event_Buffer* lv2_event_buffer_new(uint32_t capacity, uint16_t stamp_type) { - LV2_Event_Buffer* buf = (LV2_Event_Buffer*)malloc(sizeof(LV2_Event_Buffer) + capacity); + const size_t size = sizeof(LV2_Event_Buffer) + capacity; + LV2_Event_Buffer* buf = (LV2_Event_Buffer*)malloc(size); if (buf != NULL) { buf->capacity = capacity; lv2_event_buffer_reset(buf, stamp_type, (uint8_t *)(buf + 1)); -- cgit v1.2.1