]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: changes for code maintainability
authorsri-mohan1 <sri.mohan@samsung.com>
Tue, 13 Sep 2022 06:28:35 +0000 (11:58 +0530)
committersri-mohan1 <sri.mohan@samsung.com>
Thu, 15 Sep 2022 08:48:48 +0000 (14:18 +0530)
these changes are for improving the code maintainability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
zebra/if_ioctl.c
zebra/if_netlink.c
zebra/if_sysctl.c

index 2c83a7ed4ce5f2914a020958476a1d64796685c5..e02f3d5624a8ff059a2c2f6ed0bd23980cc9d16a 100644 (file)
@@ -199,7 +199,7 @@ static int if_getaddrs(void)
                ifp = if_lookup_by_name(ifap->ifa_name, VRF_DEFAULT);
                if (ifp == NULL) {
                        flog_err(EC_LIB_INTERFACE,
-                                "if_getaddrs(): Can't lookup interface %s",
+                                "%s: Can't lookup interface %s", __func__,
                                 ifap->ifa_name);
                        continue;
                }
@@ -290,7 +290,7 @@ static void interface_info_ioctl()
 void interface_list(struct zebra_ns *zns)
 {
 
-       zlog_info("interface_list: NS %u", zns->ns_id);
+       zlog_info("%s: NS %u", __func__, zns->ns_id);
 
 /* Linux can do both proc & ioctl, ioctl is the only way to get
    interface aliases in 2.2 series kernels. */
index c7e7443a1b7a18862f65848ebf05a0c0819c7e93..0927bdc1d9ec8676c0c7851fd822d8a2d6e7e7ba 100644 (file)
@@ -1443,7 +1443,7 @@ int netlink_interface_addr(struct nlmsghdr *h, ns_id_t ns_id, int startup)
        if (IS_ZEBRA_DEBUG_KERNEL) /* remove this line to see initial ifcfg */
        {
                char buf[BUFSIZ];
-               zlog_debug("netlink_interface_addr %s %s flags 0x%x:",
+               zlog_debug("%s %s %s flags 0x%x:", __func__,
                           nl_msg_type_to_str(h->nlmsg_type), ifp->name,
                           kernel_flags);
                if (tb[IFA_LOCAL])
@@ -1818,7 +1818,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
        /* assume if not default zns, then new VRF */
        if (!(h->nlmsg_type == RTM_NEWLINK || h->nlmsg_type == RTM_DELLINK)) {
                /* If this is not link add/delete message so print warning. */
-               zlog_debug("netlink_link_change: wrong kernel message %s",
+               zlog_debug("%s: wrong kernel message %s", __func__,
                           nl_msg_type_to_str(h->nlmsg_type));
                return 0;
        }
index 38729c8d38e4a9896d857bae105ee78b0ea8f1f8..70d11646c34488916fc4d9513cc377a90a443992 100644 (file)
@@ -97,7 +97,7 @@ void interface_list(struct zebra_ns *zns)
                NET_RT_IFLIST, 0};
 
        if (zns->ns_id != NS_DEFAULT) {
-               zlog_debug("interface_list: ignore NS %u", zns->ns_id);
+               zlog_debug("%s: ignore NS %u", __func__, zns->ns_id);
                return;
        }
 
@@ -132,7 +132,7 @@ void interface_list(struct zebra_ns *zns)
                        ifam_read((struct ifa_msghdr *)ifm);
                        break;
                default:
-                       zlog_info("interfaces_list(): unexpected message type");
+                       zlog_info("%s: unexpected message type", __func__);
                        XFREE(MTYPE_TMP, ref);
                        return;
                        break;