diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-03-05 20:17:54 +0200 |
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-03-05 20:23:23 +0200 |
| commit | 15569c58f8001d37bccaed7f99b6987315125036 (patch) | |
| tree | b81f9925182682ee2ad7fd969eb1de6f0072ccf8 /pimd/pim_igmp.c | |
| parent | 38e385615ac3355f09e3f8df99a25a1c30af249a (diff) | |
*: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__
Just keep the code cool.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'pimd/pim_igmp.c')
| -rw-r--r-- | pimd/pim_igmp.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c index 39ef706f79..8d39d7e800 100644 --- a/pimd/pim_igmp.c +++ b/pimd/pim_igmp.c @@ -64,9 +64,8 @@ static int igmp_sock_open(struct in_addr ifaddr, struct interface *ifp, } else { zlog_warn( "%s %s: IGMP socket fd=%d interface %s: could not solve %s to group address: errno=%d: %s", - __FILE__, __PRETTY_FUNCTION__, fd, - inet_ntoa(ifaddr), PIM_ALL_ROUTERS, errno, - safe_strerror(errno)); + __FILE__, __func__, fd, inet_ntoa(ifaddr), + PIM_ALL_ROUTERS, errno, safe_strerror(errno)); } } @@ -81,7 +80,7 @@ static int igmp_sock_open(struct in_addr ifaddr, struct interface *ifp, } else { zlog_warn( "%s %s: IGMP socket fd=%d interface %s: could not solve %s to group address: errno=%d: %s", - __FILE__, __PRETTY_FUNCTION__, fd, inet_ntoa(ifaddr), + __FILE__, __func__, fd, inet_ntoa(ifaddr), PIM_ALL_SYSTEMS, errno, safe_strerror(errno)); } @@ -92,7 +91,7 @@ static int igmp_sock_open(struct in_addr ifaddr, struct interface *ifp, } else { zlog_warn( "%s %s: IGMP socket fd=%d interface %s: could not solve %s to group address: errno=%d: %s", - __FILE__, __PRETTY_FUNCTION__, fd, inet_ntoa(ifaddr), + __FILE__, __func__, fd, inet_ntoa(ifaddr), PIM_ALL_IGMP_ROUTERS, errno, safe_strerror(errno)); } @@ -119,8 +118,8 @@ static void igmp_sock_dump(array_t *igmp_sock_array) struct igmp_sock *igmp = array_get(igmp_sock_array, i); zlog_debug("%s %s: [%d/%d] igmp_addr=%s fd=%d", __FILE__, - __PRETTY_FUNCTION__, i, size, - inet_ntoa(igmp->ifaddr), igmp->fd); + __func__, i, size, inet_ntoa(igmp->ifaddr), + igmp->fd); } } #endif @@ -166,8 +165,7 @@ static int pim_igmp_other_querier_expire(struct thread *t) char ifaddr_str[INET_ADDRSTRLEN]; pim_inet4_dump("<ifaddr?>", igmp->ifaddr, ifaddr_str, sizeof(ifaddr_str)); - zlog_debug("%s: Querier %s resuming", __PRETTY_FUNCTION__, - ifaddr_str); + zlog_debug("%s: Querier %s resuming", __func__, ifaddr_str); } /* @@ -419,7 +417,7 @@ static int igmp_v1_recv_report(struct igmp_sock *igmp, struct in_addr from, struct igmp_group *group; struct in_addr group_addr; - on_trace(__PRETTY_FUNCTION__, igmp->interface, from); + on_trace(__func__, igmp->interface, from); if (igmp->mtrace_only) return 0; @@ -435,8 +433,7 @@ static int igmp_v1_recv_report(struct igmp_sock *igmp, struct in_addr from, igmp->rx_stats.report_v1++; if (PIM_DEBUG_IGMP_TRACE) { - zlog_warn("%s %s: FIXME WRITEME", __FILE__, - __PRETTY_FUNCTION__); + zlog_warn("%s %s: FIXME WRITEME", __FILE__, __func__); } memcpy(&group_addr, igmp_msg + 4, sizeof(struct in_addr)); @@ -1014,9 +1011,8 @@ static int igmp_group_timer(struct thread *t) char group_str[INET_ADDRSTRLEN]; pim_inet4_dump("<group?>", group->group_addr, group_str, sizeof(group_str)); - zlog_debug("%s: Timer for group %s on interface %s", - __PRETTY_FUNCTION__, group_str, - group->group_igmp_sock->interface->name); + zlog_debug("%s: Timer for group %s on interface %s", __func__, + group_str, group->group_igmp_sock->interface->name); } zassert(group->group_filtermode_isexcl); @@ -1108,7 +1104,7 @@ struct igmp_group *igmp_add_group_by_addr(struct igmp_sock *igmp, if (!pim_is_group_224_4(group_addr)) { zlog_warn("%s: Group Specified is not part of 224.0.0.0/4", - __PRETTY_FUNCTION__); + __func__); return NULL; } @@ -1116,7 +1112,7 @@ struct igmp_group *igmp_add_group_by_addr(struct igmp_sock *igmp, if (PIM_DEBUG_IGMP_TRACE) zlog_debug( "%s: Group specified %s is part of 224.0.0.0/24", - __PRETTY_FUNCTION__, inet_ntoa(group_addr)); + __func__, inet_ntoa(group_addr)); return NULL; } /* |
