mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 05:27:16 +02:00
pathd: clean up variable-shadow warnings
Clean up various variable-shadow warnings from -Wshadow Signed-off-by: Mark Stapp <mjs@cisco.com>
This commit is contained in:
parent
bf6e7c1da5
commit
06614a803b
|
@ -31,7 +31,7 @@ static enum zclient_send_status path_ted_link_state_sync(void);
|
|||
static void path_ted_timer_handler_sync(struct event *thread);
|
||||
static void path_ted_timer_handler_refresh(struct event *thread);
|
||||
|
||||
extern struct zclient *zclient;
|
||||
extern struct zclient *pathd_zclient;
|
||||
|
||||
struct ted_state ted_state_g = { .dbg = { .conf = "debug pathd mpls-te",
|
||||
.desc = "Pathd TED" } };
|
||||
|
@ -40,9 +40,9 @@ struct ted_state ted_state_g = { .dbg = { .conf = "debug pathd mpls-te",
|
|||
* path_path_ted public API function implementations
|
||||
*/
|
||||
|
||||
void path_ted_init(struct event_loop *master)
|
||||
void path_ted_init(struct event_loop *loop)
|
||||
{
|
||||
ted_state_g.main = master;
|
||||
ted_state_g.main = loop;
|
||||
ted_state_g.link_state_delay_interval = TIMER_RETRY_DELAY;
|
||||
ted_state_g.segment_list_refresh_interval = TIMER_RETRY_DELAY;
|
||||
path_ted_register_vty();
|
||||
|
@ -82,7 +82,7 @@ uint32_t path_ted_start_importing_igp(const char *daemon_str)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (ls_register(zclient, false /*client*/) != 0) {
|
||||
if (ls_register(pathd_zclient, false /*client*/) != 0) {
|
||||
PATH_TED_ERROR("%s: PATHD-TED: Unable to register Link State",
|
||||
__func__);
|
||||
ted_state_g.import = IMPORT_UNKNOWN;
|
||||
|
@ -113,7 +113,7 @@ uint32_t path_ted_stop_importing_igp(void)
|
|||
uint32_t status = 0;
|
||||
|
||||
if (ted_state_g.import != IMPORT_UNKNOWN) {
|
||||
if (ls_unregister(zclient, false /*client*/) != 0) {
|
||||
if (ls_unregister(pathd_zclient, false /*client*/) != 0) {
|
||||
PATH_TED_ERROR(
|
||||
"%s: PATHD-TED: Unable to unregister Link State",
|
||||
__func__);
|
||||
|
@ -382,7 +382,7 @@ DEFUN (no_path_ted,
|
|||
ted_state_g.enabled = false;
|
||||
PATH_TED_DEBUG("%s: PATHD-TED: ON -> OFF", __func__);
|
||||
ted_state_g.import = IMPORT_UNKNOWN;
|
||||
if (ls_unregister(zclient, false /*client*/) != 0) {
|
||||
if (ls_unregister(pathd_zclient, false /*client*/) != 0) {
|
||||
vty_out(vty, "Unable to unregister Link State\n");
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
@ -538,7 +538,7 @@ enum zclient_send_status path_ted_link_state_sync(void)
|
|||
{
|
||||
enum zclient_send_status status;
|
||||
|
||||
status = ls_request_sync(zclient);
|
||||
status = ls_request_sync(pathd_zclient);
|
||||
if (status == -1) {
|
||||
PATH_TED_ERROR(
|
||||
"%s: PATHD-TED: Opaque error asking for TED sync ",
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
static int path_zebra_opaque_msg_handler(ZAPI_CALLBACK_ARGS);
|
||||
|
||||
struct zclient *zclient;
|
||||
struct zclient *pathd_zclient;
|
||||
static struct zclient *zclient_sync;
|
||||
|
||||
/* Event to retry synch zapi setup for label-manager */
|
||||
|
@ -189,7 +189,7 @@ void path_zebra_add_sr_policy(struct srte_policy *policy,
|
|||
segment->sid_value;
|
||||
policy->status = SRTE_POLICY_STATUS_GOING_UP;
|
||||
|
||||
(void)zebra_send_sr_policy(zclient, ZEBRA_SR_POLICY_SET, &zp);
|
||||
(void)zebra_send_sr_policy(pathd_zclient, ZEBRA_SR_POLICY_SET, &zp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -209,7 +209,7 @@ void path_zebra_delete_sr_policy(struct srte_policy *policy)
|
|||
zp.segment_list.label_num = 0;
|
||||
policy->status = SRTE_POLICY_STATUS_DOWN;
|
||||
|
||||
(void)zebra_send_sr_policy(zclient, ZEBRA_SR_POLICY_DELETE, &zp);
|
||||
(void)zebra_send_sr_policy(pathd_zclient, ZEBRA_SR_POLICY_DELETE, &zp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -351,13 +351,13 @@ static zclient_handler *const path_handlers[] = {
|
|||
*
|
||||
* @param master The master thread
|
||||
*/
|
||||
void path_zebra_init(struct event_loop *master)
|
||||
void path_zebra_init(struct event_loop *loop)
|
||||
{
|
||||
/* Initialize asynchronous zclient. */
|
||||
zclient = zclient_new(master, &zclient_options_default, path_handlers,
|
||||
array_size(path_handlers));
|
||||
zclient_init(zclient, ZEBRA_ROUTE_SRTE, 0, &pathd_privs);
|
||||
zclient->zebra_connected = path_zebra_connected;
|
||||
pathd_zclient = zclient_new(loop, &zclient_options_default, path_handlers,
|
||||
array_size(path_handlers));
|
||||
zclient_init(pathd_zclient, ZEBRA_ROUTE_SRTE, 0, &pathd_privs);
|
||||
pathd_zclient->zebra_connected = path_zebra_connected;
|
||||
|
||||
/* Initialize special zclient for synchronous message exchanges. */
|
||||
zclient_sync = zclient_new(master, &zclient_options_sync, NULL, 0);
|
||||
|
@ -373,8 +373,8 @@ void path_zebra_init(struct event_loop *master)
|
|||
|
||||
void path_zebra_stop(void)
|
||||
{
|
||||
zclient_stop(zclient);
|
||||
zclient_free(zclient);
|
||||
zclient_stop(pathd_zclient);
|
||||
zclient_free(pathd_zclient);
|
||||
event_cancel(&t_sync_connect);
|
||||
zclient_stop(zclient_sync);
|
||||
zclient_free(zclient_sync);
|
||||
|
|
Loading…
Reference in a new issue