Skip to content

Commit 0bf5cbc

Browse files
Flavio Ceolinaescolar
authored andcommitted
syscall_handler: Fix warnings in K_SYSCALL_MEMORY
Put parenthesis around parameters in K_SYSCALL_MEMORY_SIZE_CHECK to avoid possible warnings during the macro expansion. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 1f67dcb commit 0bf5cbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/zephyr/internal/syscall_handler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ int k_usermode_string_copy(char *dst, const char *src, size_t maxlen);
408408
* functionality in the Zephyr tree.
409409
*/
410410
#define K_SYSCALL_MEMORY_SIZE_CHECK(ptr, size) \
411-
(((uintptr_t)ptr + size) >= (uintptr_t)ptr)
411+
(((uintptr_t)(ptr) + (size)) >= (uintptr_t)(ptr))
412412

413413
/**
414414
* @brief Runtime check that a user thread has read and/or write permission to

0 commit comments

Comments
 (0)