summaryrefslogtreecommitdiff
path: root/lib/module.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-02-11 16:10:40 -0200
committerRenato Westphal <renato@opensourcerouting.org>2019-02-11 22:34:12 -0200
commit7f04943d6b860f5e74a8fc652a106c3a2046a0ce (patch)
treedba085741a8b01b0781c70f07d6db544a267ad82 /lib/module.h
parent343cd13e17062eb024f45b44036d930988bd0299 (diff)
lib: a few more trivial changes for C++ compatibility
* command_graph.h: stop using "new" as a parameter name as that's a reserved C++ keyword. * module.h: avoid using C99 designated initializers since C++ doesn't support them. This change hurts code readability quite considerably, so we should try to find a better solution later. * pw.h: remove unneeded empty structure to silence a C++ warning. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/module.h')
-rw-r--r--lib/module.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/module.h b/lib/module.h
index 73ba8665ed..c5f96db85b 100644
--- a/lib/module.h
+++ b/lib/module.h
@@ -82,9 +82,10 @@ extern union _frrmod_runtime_u _frrmod_this_module;
#define FRR_COREMOD_SETUP(...) \
static const struct frrmod_info _frrmod_info = {__VA_ARGS__}; \
- DSO_LOCAL union _frrmod_runtime_u _frrmod_this_module = { \
- .r.info = &_frrmod_info, \
- };
+ DSO_LOCAL union _frrmod_runtime_u _frrmod_this_module = {{ \
+ NULL, \
+ &_frrmod_info, \
+ }};
#define FRR_MODULE_SETUP(...) \
FRR_COREMOD_SETUP(__VA_ARGS__) \
DSO_SELF struct frrmod_runtime *frr_module = &_frrmod_this_module.r;