summaryrefslogtreecommitdiffstats
path: root/firmware/buflib.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/buflib.c')
-rw-r--r--firmware/buflib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/buflib.c b/firmware/buflib.c
index 4551fd8dca..05e489ea14 100644
--- a/firmware/buflib.c
+++ b/firmware/buflib.c
@@ -144,7 +144,7 @@ bool buflib_context_relocate(struct buflib_context *ctx, void *buf)
/* cannot continue if the buffer is not aligned, since we would need
* to reduce the size of the buffer for aligning */
- if ((uintptr_t)buf & 0x3)
+ if (!IS_ALIGNED((uintptr_t)buf, sizeof(union buflib_data)))
return false;
/* relocate the handle table entries */