]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: a few more trivial changes for C++ compatibility
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 11 Feb 2019 18:10:40 +0000 (16:10 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 12 Feb 2019 00:34:12 +0000 (22:34 -0200)
* 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>
lib/command_graph.h
lib/module.h
lib/pw.h

index cfacad43e24738e6ae9b839a69c6932bfc166db1..903d5158341789aa0ecce696f922a87f47f50fb0 100644 (file)
@@ -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.
index 73ba8665ed6b67599edf1269605171a957d36aa6..c5f96db85b0511ca78b88d2c82ed9e34f340ab41 100644 (file)
@@ -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;
index 0b923ed6b122ff8a27f6e5c8f8eefd1ba1e30f9a..42b3ee21553664828a040adbcddeb416a2ef362d 100644 (file)
--- a/lib/pw.h
+++ b/lib/pw.h
@@ -48,9 +48,6 @@ union pw_protocol_fields {
                uint32_t pwid;
                char vpn_name[L2VPN_NAME_LEN];
        } ldp;
-       struct {
-               /* TODO */
-       } bgp;
 };
 
 #ifdef __cplusplus