diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-03-05 19:17:54 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-03-05 19:23:23 +0100 |
commit | 15569c58f8001d37bccaed7f99b6987315125036 (patch) | |
tree | b81f9925182682ee2ad7fd969eb1de6f0072ccf8 /staticd | |
parent | tools: Add Coccinelle script to replace __FUNCTION__ to __func__ (diff) | |
download | frr-15569c58f8001d37bccaed7f99b6987315125036.tar.xz frr-15569c58f8001d37bccaed7f99b6987315125036.zip |
*: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__
Just keep the code cool.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'staticd')
-rw-r--r-- | staticd/static_vty.c | 34 | ||||
-rw-r--r-- | staticd/static_zebra.c | 12 |
2 files changed, 21 insertions, 25 deletions
diff --git a/staticd/static_vty.c b/staticd/static_vty.c index 6390fd811..3903a5a5c 100644 --- a/staticd/static_vty.c +++ b/staticd/static_vty.c @@ -287,8 +287,8 @@ static int static_route_leak( if (vty) vty_out(vty, "%% Malformed address\n"); else - zlog_warn("%s: Malformed address: %s", - __PRETTY_FUNCTION__, dest_str); + zlog_warn("%s: Malformed address: %s", __func__, + dest_str); return CMD_WARNING_CONFIG_FAILED; } @@ -302,8 +302,7 @@ static int static_route_leak( vty_out(vty, "%% Malformed address\n"); else zlog_warn("%s: Malformed address: %s", - __PRETTY_FUNCTION__, - mask_str); + __func__, mask_str); return CMD_WARNING_CONFIG_FAILED; } p.prefixlen = ip_masklen(mask); @@ -320,7 +319,7 @@ static int static_route_leak( else zlog_warn( "%s: Malformed source address: %s", - __PRETTY_FUNCTION__, src_str); + __func__, src_str); return CMD_WARNING_CONFIG_FAILED; } src_p = (struct prefix_ipv6 *)&src; @@ -351,10 +350,9 @@ static int static_route_leak( "%% Table %s overlaps vrf table %u\n", table_str, svrf->vrf->data.l.table_id); else - zlog_warn( - "%s: Table %s overlaps vrf table %u", - __PRETTY_FUNCTION__, - table_str, svrf->vrf->data.l.table_id); + zlog_warn("%s: Table %s overlaps vrf table %u", + __func__, table_str, + svrf->vrf->data.l.table_id); return CMD_WARNING_CONFIG_FAILED; } } @@ -379,7 +377,7 @@ static int static_route_leak( else zlog_warn( "%s: MPLS not turned on in kernel ignoring static route to %s", - __PRETTY_FUNCTION__, dest_str); + __func__, dest_str); return CMD_WARNING_CONFIG_FAILED; } int rc = mpls_str2label(label_str, &snh_label.num_labels, @@ -392,7 +390,7 @@ static int static_route_leak( else zlog_warn( "%s: Malformed labels specified for route %s", - __PRETTY_FUNCTION__, dest_str); + __func__, dest_str); break; case -2: if (vty) @@ -403,7 +401,7 @@ static int static_route_leak( else zlog_warn( "%s: Cannot use reserved labels (%d-%d) for %s", - __PRETTY_FUNCTION__, + __func__, MPLS_LABEL_RESERVED_MIN, MPLS_LABEL_RESERVED_MAX, dest_str); @@ -416,8 +414,8 @@ static int static_route_leak( else zlog_warn( "%s: Too many labels, Enter %d or fewer for %s", - __PRETTY_FUNCTION__, - MPLS_MAX_LABELS, dest_str); + __func__, MPLS_MAX_LABELS, + dest_str); break; } return CMD_WARNING_CONFIG_FAILED; @@ -439,7 +437,7 @@ static int static_route_leak( else zlog_warn( "%s: %s: Nexthop interface name can not be from reserved keywords (Null0, reject, blackhole)", - __PRETTY_FUNCTION__, dest_str); + __func__, dest_str); return CMD_WARNING_CONFIG_FAILED; } } @@ -462,8 +460,7 @@ static int static_route_leak( flag_str); else zlog_warn("%s: Malformed flag %s for %s", - __PRETTY_FUNCTION__, flag_str, - dest_str); + __func__, flag_str, dest_str); return CMD_WARNING_CONFIG_FAILED; } } @@ -477,8 +474,7 @@ static int static_route_leak( else zlog_warn( "%s: Malformed nexthop address %s for %s", - __PRETTY_FUNCTION__, gate_str, - dest_str); + __func__, gate_str, dest_str); return CMD_WARNING_CONFIG_FAILED; } gatep = &gate; diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index 42646d15b..5cadf3436 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -122,12 +122,13 @@ static int route_notify_owner(ZAPI_CALLBACK_ARGS) case ZAPI_ROUTE_FAIL_INSTALL: static_nht_mark_state(&p, vrf_id, STATIC_NOT_INSTALLED); zlog_warn("%s: Route %s failed to install for table: %u", - __PRETTY_FUNCTION__, buf, table_id); + __func__, buf, table_id); break; case ZAPI_ROUTE_BETTER_ADMIN_WON: static_nht_mark_state(&p, vrf_id, STATIC_NOT_INSTALLED); - zlog_warn("%s: Route %s over-ridden by better route for table: %u", - __PRETTY_FUNCTION__, buf, table_id); + zlog_warn( + "%s: Route %s over-ridden by better route for table: %u", + __func__, buf, table_id); break; case ZAPI_ROUTE_INSTALLED: static_nht_mark_state(&p, vrf_id, STATIC_INSTALLED); @@ -138,7 +139,7 @@ static int route_notify_owner(ZAPI_CALLBACK_ARGS) case ZAPI_ROUTE_REMOVE_FAIL: static_nht_mark_state(&p, vrf_id, STATIC_INSTALLED); zlog_warn("%s: Route %s failure to remove for table: %u", - __PRETTY_FUNCTION__, buf, table_id); + __func__, buf, table_id); break; } @@ -335,8 +336,7 @@ void static_zebra_nht_register(struct route_node *rn, } if (zclient_send_rnh(zclient, cmd, &p, false, si->nh_vrf_id) < 0) - zlog_warn("%s: Failure to send nexthop to zebra", - __PRETTY_FUNCTION__); + zlog_warn("%s: Failure to send nexthop to zebra", __func__); } extern void static_zebra_route_add(struct route_node *rn, |