Skip to content

Commit e71e8a1

Browse files
Merge pull request #1428 from ldrumm/semicolons-in-macros
Remove semicolons from macro expansions
2 parents b5815de + b4c42bc commit e71e8a1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/ctl/ctl_internal.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,15 @@ void ctl_register_module_node(struct ctl *c, const char *name,
127127

128128
int ctl_arg_boolean(const void *arg, void *dest, size_t dest_size);
129129
#define CTL_ARG_BOOLEAN \
130-
{sizeof(int), {{0, sizeof(int), ctl_arg_boolean}, CTL_ARG_PARSER_END}};
130+
{ \
131+
sizeof(int), { {0, sizeof(int), ctl_arg_boolean}, CTL_ARG_PARSER_END } \
132+
}
131133

132134
int ctl_arg_integer(const void *arg, void *dest, size_t dest_size);
133135
#define CTL_ARG_INT \
134-
{sizeof(int), {{0, sizeof(int), ctl_arg_integer}, CTL_ARG_PARSER_END}};
136+
{ \
137+
sizeof(int), { {0, sizeof(int), ctl_arg_integer}, CTL_ARG_PARSER_END } \
138+
}
135139

136140
#define CTL_ARG_LONG_LONG \
137141
{ \
@@ -142,7 +146,9 @@ int ctl_arg_integer(const void *arg, void *dest, size_t dest_size);
142146

143147
int ctl_arg_string(const void *arg, void *dest, size_t dest_size);
144148
#define CTL_ARG_STRING(len) \
145-
{len, {{0, len, ctl_arg_string}, CTL_ARG_PARSER_END}};
149+
{ \
150+
len, { {0, len, ctl_arg_string}, CTL_ARG_PARSER_END } \
151+
}
146152

147153
#define CTL_STR(name) #name
148154

0 commit comments

Comments
 (0)