Skip to content

Commit b06bc33

Browse files
Ian Levinerobertbaldyga
authored andcommitted
env: posix: Fix compilation warning in ARRAY_SIZE()
Signed-off-by: Ian Levine <ian.levine@huawei.com> Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
1 parent e3b760f commit b06bc33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

env/posix/ocf_env.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void env_stack_trace(void);
8585
const typeof(((type *)0)->member)*__mptr = (ptr); \
8686
(type *)((char *)__mptr - offsetof(type, member)); })
8787

88-
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
88+
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
8989

9090
/* STRING OPERATIONS */
9191
#define env_memcpy(dest, dmax, src, slen) ({ \

0 commit comments

Comments
 (0)