From 279e5b45b856ba5229e272fb4d4b6f3948d4aa1a Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Mon, 27 Jan 2020 15:21:07 +0100 Subject: [PATCH] shell: Fix SHELL_COND_CMD_ARG_REGISTER macro with NULL handler Macro was failing when handler was NULL and else case was hit because of attempt to concatenate with handler which was set to NULL (which is ((void *)0)). Signed-off-by: Krzysztof Chruscinski --- include/shell/shell.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/shell/shell.h b/include/shell/shell.h index 1f0cac72771..afe9dfc2d54 100644 --- a/include/shell/shell.h +++ b/include/shell/shell.h @@ -162,7 +162,7 @@ struct shell_static_entry { mandatory, optional) \ ), \ (\ - static shell_cmd_handler dummy_##syntax##handler \ + static shell_cmd_handler dummy_##syntax##_handler \ __attribute__((unused)) = handler;\ static const struct shell_cmd_entry *dummy_subcmd_##syntax \ __attribute__((unused)) = subcmd\