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 /ospfd | |
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 'ospfd')
-rw-r--r-- | ospfd/ospf_flood.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_interface.c | 6 | ||||
-rw-r--r-- | ospfd/ospf_lsa.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_nsm.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_packet.c | 11 | ||||
-rw-r--r-- | ospfd/ospf_snmp.c | 4 | ||||
-rw-r--r-- | ospfd/ospf_zebra.c | 12 | ||||
-rw-r--r-- | ospfd/ospfd.c | 20 |
8 files changed, 28 insertions, 31 deletions
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index c29b464ca..818e7e72b 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -948,7 +948,7 @@ void ospf_lsa_flush_area(struct ospf_lsa *lsa, struct ospf_area *area) retransmissions */ lsa->data->ls_age = htons(OSPF_LSA_MAXAGE); if (IS_DEBUG_OSPF_EVENT) - zlog_debug("%s: MAXAGE set to LSA %s", __PRETTY_FUNCTION__, + zlog_debug("%s: MAXAGE set to LSA %s", __func__, inet_ntoa(lsa->data->id)); monotime(&lsa->tv_recv); lsa->tv_orig = lsa->tv_recv; diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index f2efaf322..1622b2fd2 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -272,8 +272,8 @@ struct ospf_interface *ospf_if_new(struct ospf *ospf, struct interface *ifp, if (IS_DEBUG_OSPF_EVENT) zlog_debug("%s: ospf interface %s vrf %s id %u created", - __PRETTY_FUNCTION__, ifp->name, - ospf_get_name(ospf), ospf->vrf_id); + __func__, ifp->name, ospf_get_name(ospf), + ospf->vrf_id); return oi; } @@ -349,7 +349,7 @@ void ospf_if_free(struct ospf_interface *oi) if (IS_DEBUG_OSPF_EVENT) zlog_debug("%s: ospf interface %s vrf %s id %u deleted", - __PRETTY_FUNCTION__, oi->ifp->name, + __func__, oi->ifp->name, ospf_vrf_id_to_name(oi->ifp->vrf_id), oi->ifp->vrf_id); diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 35bbe06cd..52db1de2d 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -2858,7 +2858,7 @@ void ospf_lsa_maxage_delete(struct ospf *ospf, struct ospf_lsa *lsa) } else { if (IS_DEBUG_OSPF_EVENT) zlog_debug("%s: lsa %s is not found in maxage db.", - __PRETTY_FUNCTION__, dump_lsa_key(lsa)); + __func__, dump_lsa_key(lsa)); } } diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index 0fc2cd60f..58f087ca4 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -684,7 +684,7 @@ static void nsm_change_state(struct ospf_neighbor *nbr, int state) zlog_info( "%s:[%s:%s], %s -> %s): " "scheduling new router-LSA origination", - __PRETTY_FUNCTION__, inet_ntoa(nbr->router_id), + __func__, inet_ntoa(nbr->router_id), ospf_get_name(oi->ospf), lookup_msg(ospf_nsm_state_msg, old_state, NULL), lookup_msg(ospf_nsm_state_msg, state, NULL)); diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 213db15fa..de8c371f1 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -2376,9 +2376,9 @@ static struct stream *ospf_recv_packet(struct ospf *ospf, int fd, } if (IS_DEBUG_OSPF_PACKET(0, RECV)) - zlog_debug("%s: fd %d(%s) on interface %d(%s)", - __PRETTY_FUNCTION__, fd, ospf_get_name(ospf), - ifindex, *ifp ? (*ifp)->name : "Unknown"); + zlog_debug("%s: fd %d(%s) on interface %d(%s)", __func__, fd, + ospf_get_name(ospf), ifindex, + *ifp ? (*ifp)->name : "Unknown"); return ibuf; } @@ -2984,8 +2984,7 @@ static enum ospf_read_return_enum ospf_read_helper(struct ospf *ospf) if (IS_DEBUG_OSPF_PACKET(0, RECV)) zlog_debug( "%s: Unable to determine incoming interface from: %s(%s)", - __PRETTY_FUNCTION__, - inet_ntoa(iph->ip_src), + __func__, inet_ntoa(iph->ip_src), ospf_get_name(ospf)); return OSPF_READ_CONTINUE; } @@ -3689,7 +3688,7 @@ static void ospf_hello_send_sub(struct ospf_interface *oi, in_addr_t addr) if (oi->ospf->vrf_id) zlog_debug( "%s: Hello Tx interface %s ospf vrf %s id %u", - __PRETTY_FUNCTION__, oi->ifp->name, + __func__, oi->ifp->name, ospf_vrf_id_to_name(oi->ospf->vrf_id), oi->ospf->vrf_id); } diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c index 7bd586fd3..5c9fbdb90 100644 --- a/ospfd/ospf_snmp.c +++ b/ospfd/ospf_snmp.c @@ -2455,7 +2455,7 @@ static void ospfTrapNbrStateChange(struct ospf_neighbor *on) ospf_nbr_state_message(on, msgbuf, sizeof(msgbuf)); if (IS_DEBUG_OSPF_EVENT) - zlog_info("%s: trap sent: %s now %s", __PRETTY_FUNCTION__, + zlog_info("%s: trap sent: %s now %s", __func__, inet_ntoa(on->address.u.prefix4), msgbuf); oid_copy_addr(index, &(on->address.u.prefix4), IN_ADDR_SIZE); @@ -2508,7 +2508,7 @@ static void ospfTrapIfStateChange(struct ospf_interface *oi) oid index[sizeof(oid) * (IN_ADDR_SIZE + 1)]; if (IS_DEBUG_OSPF_EVENT) - zlog_info("%s: trap sent: %s now %s", __PRETTY_FUNCTION__, + zlog_info("%s: trap sent: %s now %s", __func__, inet_ntoa(oi->address->u.prefix4), lookup_msg(ospf_ism_state_msg, oi->state, NULL)); diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index d41525665..1cea79d64 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -87,8 +87,8 @@ static int ospf_router_id_update_zebra(ZAPI_CALLBACK_ARGS) prefix2str(&router_id, buf, sizeof(buf)); zlog_debug( "%s: ospf instance not found for vrf %s id %u router_id %s", - __PRETTY_FUNCTION__, - ospf_vrf_id_to_name(vrf_id), vrf_id, buf); + __func__, ospf_vrf_id_to_name(vrf_id), vrf_id, + buf); } } return 0; @@ -197,7 +197,7 @@ static int ospf_interface_vrf_update(ZAPI_CALLBACK_ARGS) if (IS_DEBUG_OSPF_EVENT) zlog_debug( "%s: Rx Interface %s VRF change vrf_id %u New vrf %s id %u", - __PRETTY_FUNCTION__, ifp->name, vrf_id, + __func__, ifp->name, vrf_id, ospf_vrf_id_to_name(new_vrf_id), new_vrf_id); /*if_update(ifp, ifp->name, strlen(ifp->name), new_vrf_id);*/ @@ -1320,8 +1320,7 @@ void ospf_zebra_vrf_register(struct ospf *ospf) if (ospf->vrf_id != VRF_UNKNOWN) { if (IS_DEBUG_OSPF_EVENT) - zlog_debug("%s: Register VRF %s id %u", - __PRETTY_FUNCTION__, + zlog_debug("%s: Register VRF %s id %u", __func__, ospf_vrf_id_to_name(ospf->vrf_id), ospf->vrf_id); zclient_send_reg_requests(zclient, ospf->vrf_id); @@ -1336,8 +1335,7 @@ void ospf_zebra_vrf_deregister(struct ospf *ospf) if (ospf->vrf_id != VRF_DEFAULT && ospf->vrf_id != VRF_UNKNOWN) { if (IS_DEBUG_OSPF_EVENT) zlog_debug("%s: De-Register VRF %s id %u to Zebra.", - __PRETTY_FUNCTION__, - ospf_vrf_id_to_name(ospf->vrf_id), + __func__, ospf_vrf_id_to_name(ospf->vrf_id), ospf->vrf_id); /* Deregister for router-id, interfaces, * redistributed routes. */ diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 2a3f1329a..2a0f8cdc0 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -220,7 +220,7 @@ static struct ospf *ospf_new(unsigned short instance, const char *name) if (IS_DEBUG_OSPF_EVENT) zlog_debug( "%s: Create new ospf instance with vrf_name %s vrf_id %u", - __PRETTY_FUNCTION__, name, new->vrf_id); + __func__, name, new->vrf_id); } else { new->vrf_id = VRF_DEFAULT; vrf = vrf_lookup_by_id(VRF_DEFAULT); @@ -1308,7 +1308,7 @@ void ospf_if_update(struct ospf *ospf, struct interface *ifp) if (IS_DEBUG_OSPF_EVENT) zlog_debug( "%s: interface %s ifp->vrf_id %u ospf vrf %s vrf_id %u router_id %s", - __PRETTY_FUNCTION__, ifp->name, ifp->vrf_id, + __func__, ifp->name, ifp->vrf_id, ospf_vrf_id_to_name(ospf->vrf_id), ospf->vrf_id, inet_ntoa(ospf->router_id)); @@ -2019,8 +2019,8 @@ void ospf_vrf_unlink(struct ospf *ospf, struct vrf *vrf) static int ospf_vrf_new(struct vrf *vrf) { if (IS_DEBUG_OSPF_EVENT) - zlog_debug("%s: VRF Created: %s(%u)", __PRETTY_FUNCTION__, - vrf->name, vrf->vrf_id); + zlog_debug("%s: VRF Created: %s(%u)", __func__, vrf->name, + vrf->vrf_id); return 0; } @@ -2029,8 +2029,8 @@ static int ospf_vrf_new(struct vrf *vrf) static int ospf_vrf_delete(struct vrf *vrf) { if (IS_DEBUG_OSPF_EVENT) - zlog_debug("%s: VRF Deletion: %s(%u)", __PRETTY_FUNCTION__, - vrf->name, vrf->vrf_id); + zlog_debug("%s: VRF Deletion: %s(%u)", __func__, vrf->name, + vrf->vrf_id); return 0; } @@ -2113,8 +2113,8 @@ static int ospf_vrf_disable(struct vrf *vrf) return 0; if (IS_DEBUG_OSPF_EVENT) - zlog_debug("%s: VRF %s id %d disabled.", __PRETTY_FUNCTION__, - vrf->name, vrf->vrf_id); + zlog_debug("%s: VRF %s id %d disabled.", __func__, vrf->name, + vrf->vrf_id); ospf = ospf_lookup_by_name(vrf->name); if (ospf) { @@ -2126,8 +2126,8 @@ static int ospf_vrf_disable(struct vrf *vrf) ospf_vrf_unlink(ospf, vrf); ospf->oi_running = 0; if (IS_DEBUG_OSPF_EVENT) - zlog_debug("%s: ospf old_vrf_id %d unlinked", - __PRETTY_FUNCTION__, old_vrf_id); + zlog_debug("%s: ospf old_vrf_id %d unlinked", __func__, + old_vrf_id); thread_cancel(ospf->t_read); close(ospf->fd); ospf->fd = -1; |