From: Emanuele Di Pascale Date: Mon, 21 Dec 2020 12:17:09 +0000 (+0100) Subject: zebra: avoid c++ reserved keyword X-Git-Tag: base_7.6~96^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=2e8db20d7eefbbc45aa64c8f5d61be276184a69c;p=matthieu%2Ffrr.git zebra: avoid c++ reserved keyword in rib_handle_nhg_replace, do not use new as a parameter name to allow compilation of c++ code including zebra headers. Signed-off-by: Emanuele Di Pascale --- diff --git a/zebra/rib.h b/zebra/rib.h index fe7073656c..680c400f0b 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -343,8 +343,8 @@ int route_entry_update_nhe(struct route_entry *re, struct nhg_hash_entry *new_nhghe); /* NHG replace has happend, we have to update route_entry pointers to new one */ -void rib_handle_nhg_replace(struct nhg_hash_entry *old, - struct nhg_hash_entry *new); +void rib_handle_nhg_replace(struct nhg_hash_entry *old_entry, + struct nhg_hash_entry *new_entry); #define route_entry_dump(prefix, src, re) _route_entry_dump(__func__, prefix, src, re) extern void _route_entry_dump(const char *func, union prefixconstptr pp, diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 0aea0b6cfa..dc295f8926 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -250,8 +250,8 @@ done: return ret; } -void rib_handle_nhg_replace(struct nhg_hash_entry *old, - struct nhg_hash_entry *new) +void rib_handle_nhg_replace(struct nhg_hash_entry *old_entry, + struct nhg_hash_entry *new_entry) { struct zebra_router_table *zrt; struct route_node *rn; @@ -259,15 +259,15 @@ void rib_handle_nhg_replace(struct nhg_hash_entry *old, if (IS_ZEBRA_DEBUG_RIB_DETAILED || IS_ZEBRA_DEBUG_NHG_DETAIL) zlog_debug("%s: replacing routes nhe (%u) OLD %p NEW %p", - __func__, new->id, new, old); + __func__, new_entry->id, new_entry, old_entry); /* We have to do them ALL */ RB_FOREACH (zrt, zebra_router_table_head, &zrouter.tables) { for (rn = route_top(zrt->table); rn; rn = srcdest_route_next(rn)) { RNODE_FOREACH_RE_SAFE (rn, re, next) { - if (re->nhe && re->nhe == old) - route_entry_update_nhe(re, new); + if (re->nhe && re->nhe == old_entry) + route_entry_update_nhe(re, new_entry); } } }