summaryrefslogtreecommitdiffstats
path: root/firmware/include
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/buflib.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/firmware/include/buflib.h b/firmware/include/buflib.h
index 171ab5bcd7..30484431f8 100644
--- a/firmware/include/buflib.h
+++ b/firmware/include/buflib.h
@@ -237,10 +237,14 @@ int buflib_alloc_maximum(struct buflib_context* ctx, const char* name,
*
* Returns: The start pointer of the allocation
*/
-static inline void* buflib_get_data(struct buflib_context *context, int handle)
+#ifdef DEBUG
+void* buflib_get_data(struct buflib_context *ctx, int handle);
+#else
+static inline void* buflib_get_data(struct buflib_context *ctx, int handle)
{
- return (void*)(context->handle_table[-handle].alloc);
+ return (void*)(ctx->handle_table[-handle].alloc);
}
+#endif
/**
* Shrink the memory allocation associated with the given handle