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 /zebra/rt_netlink.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 'zebra/rt_netlink.c')
| -rw-r--r-- | zebra/rt_netlink.c | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 1d63db32e8..a417175da1 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -213,7 +213,7 @@ static inline int zebra2proto(int proto) */ zlog_debug( "%s: Please add this protocol(%d) to proper rt_netlink.c handling", - __PRETTY_FUNCTION__, proto); + __func__, proto); proto = RTPROT_ZEBRA; break; } @@ -280,7 +280,7 @@ static inline int proto2zebra(int proto, int family, bool is_nexthop) */ zlog_debug( "%s: Please add this protocol(%d) to proper rt_netlink.c handling", - __PRETTY_FUNCTION__, proto); + __func__, proto); proto = ZEBRA_ROUTE_KERNEL; break; } @@ -439,7 +439,7 @@ static uint8_t parse_multipath_nexthops_unicast(ns_id_t ns_id, flog_warn( EC_ZEBRA_UNKNOWN_INTERFACE, "%s: Unknown interface %u specified, defaulting to VRF_DEFAULT", - __PRETTY_FUNCTION__, index); + __func__, index); nh_vrf_id = VRF_DEFAULT; } } else @@ -557,9 +557,10 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id, len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct rtmsg)); if (len < 0) { - zlog_err("%s: Message received from netlink is of a broken size %d %zu", - __PRETTY_FUNCTION__, h->nlmsg_len, - (size_t)NLMSG_LENGTH(sizeof(struct rtmsg))); + zlog_err( + "%s: Message received from netlink is of a broken size %d %zu", + __func__, h->nlmsg_len, + (size_t)NLMSG_LENGTH(sizeof(struct rtmsg))); return -1; } @@ -951,10 +952,10 @@ int netlink_route_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct rtmsg)); if (len < 0) { - zlog_err("%s: Message received from netlink is of a broken size: %d %zu", - __PRETTY_FUNCTION__, - h->nlmsg_len, - (size_t)NLMSG_LENGTH(sizeof(struct rtmsg))); + zlog_err( + "%s: Message received from netlink is of a broken size: %d %zu", + __func__, h->nlmsg_len, + (size_t)NLMSG_LENGTH(sizeof(struct rtmsg))); return -1; } @@ -2296,7 +2297,7 @@ static struct nexthop netlink_nexthop_process_nh(struct rtattr **tb, flog_warn( EC_ZEBRA_UNKNOWN_INTERFACE, "%s: Unknown nexthop interface %u received, defaulting to VRF_DEFAULT", - __PRETTY_FUNCTION__, nh.ifindex); + __func__, nh.ifindex); nh.vrf_id = VRF_DEFAULT; } @@ -2386,7 +2387,7 @@ int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) if (len < 0) { zlog_warn( "%s: Message received from netlink is of a broken size %d %zu", - __PRETTY_FUNCTION__, h->nlmsg_len, + __func__, h->nlmsg_len, (size_t)NLMSG_LENGTH(sizeof(struct nhmsg))); return -1; } @@ -2606,7 +2607,7 @@ static int netlink_macfdb_change(struct nlmsghdr *h, int len, ns_id_t ns_id) if (!ifp || !ifp->info) { if (IS_ZEBRA_DEBUG_KERNEL) zlog_debug("\t%s without associated interface: %u", - __PRETTY_FUNCTION__, ndm->ndm_ifindex); + __func__, ndm->ndm_ifindex); return 0; } @@ -2614,7 +2615,7 @@ static int netlink_macfdb_change(struct nlmsghdr *h, int len, ns_id_t ns_id) if (!IS_ZEBRA_IF_BRIDGE_SLAVE(ifp)) { if (IS_ZEBRA_DEBUG_KERNEL) zlog_debug("\t%s Not interested in %s, not a slave", - __PRETTY_FUNCTION__, ifp->name); + __func__, ifp->name); return 0; } @@ -2622,7 +2623,7 @@ static int netlink_macfdb_change(struct nlmsghdr *h, int len, ns_id_t ns_id) if (ndm->ndm_state & NUD_PERMANENT) { if (IS_ZEBRA_DEBUG_KERNEL) zlog_debug("\t%s Entry is PERMANENT, dropping", - __PRETTY_FUNCTION__); + __func__); return 0; } @@ -2871,8 +2872,7 @@ static int netlink_request_specific_mac_in_bridge(struct zebra_ns *zns, addattr32(&req.n, sizeof(req), NDA_MASTER, br_if->ifindex); if (IS_ZEBRA_DEBUG_KERNEL) - zlog_debug("%s: Tx family %s IF %s(%u) MAC %s vid %u", - __PRETTY_FUNCTION__, + zlog_debug("%s: Tx family %s IF %s(%u) MAC %s vid %u", __func__, nl_family_to_str(req.ndm.ndm_family), br_if->name, br_if->ifindex, prefix_mac2str(mac, buf, sizeof(buf)), vid); @@ -3303,10 +3303,8 @@ int netlink_neigh_read_specific_ip(struct ipaddr *ip, if (IS_ZEBRA_DEBUG_KERNEL) zlog_debug("%s: neigh request IF %s(%u) IP %s vrf_id %u", - __PRETTY_FUNCTION__, vlan_if->name, - vlan_if->ifindex, - ipaddr2str(ip, buf, sizeof(buf)), - vlan_if->vrf_id); + __func__, vlan_if->name, vlan_if->ifindex, + ipaddr2str(ip, buf, sizeof(buf)), vlan_if->vrf_id); ret = netlink_request_specific_neigh_in_vlan(zns, RTM_GETNEIGH, ip, vlan_if->ifindex); @@ -3330,9 +3328,10 @@ int netlink_neigh_change(struct nlmsghdr *h, ns_id_t ns_id) /* Length validity. */ len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct ndmsg)); if (len < 0) { - zlog_err("%s: Message received from netlink is of a broken size %d %zu", - __PRETTY_FUNCTION__, h->nlmsg_len, - (size_t)NLMSG_LENGTH(sizeof(struct ndmsg))); + zlog_err( + "%s: Message received from netlink is of a broken size %d %zu", + __func__, h->nlmsg_len, + (size_t)NLMSG_LENGTH(sizeof(struct ndmsg))); return -1; } |
