mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 15:10:38 +00:00
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>
This commit is contained in:
parent
343cd13e17
commit
7f04943d6b
@ -118,7 +118,7 @@ extern void cmd_token_varname_set(struct cmd_token *token, const char *varname);
|
||||
|
||||
extern void cmd_graph_parse(struct graph *graph, struct cmd_element *cmd);
|
||||
extern void cmd_graph_names(struct graph *graph);
|
||||
extern void cmd_graph_merge(struct graph *old, struct graph *new,
|
||||
extern void cmd_graph_merge(struct graph *old, struct graph *n,
|
||||
int direction);
|
||||
/*
|
||||
* Print callback for DOT dumping.
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user