]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: changes for code maintainability 11997/head
authorsri-mohan1 <sri.mohan@samsung.com>
Thu, 22 Sep 2022 18:34:40 +0000 (00:04 +0530)
committersri-mohan1 <sri.mohan@samsung.com>
Fri, 23 Sep 2022 04:27:35 +0000 (09:57 +0530)
these changes are for improving the code maintainability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
zebra/kernel_socket.c
zebra/rtadv.c

index cb549339af5c130977178956ed9802e456a8b913..22b1029557802d7df21ffc0ccaa4a7adf6e839fc 100644 (file)
@@ -534,7 +534,7 @@ int ifm_read(struct if_msghdr *ifm)
        /* paranoia: sanity check structure */
        if (ifm->ifm_msglen < sizeof(struct if_msghdr)) {
                flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
-                        "ifm_read: ifm->ifm_msglen %d too short",
+                        "%s: ifm->ifm_msglen %d too short", __func__,
                         ifm->ifm_msglen);
                return -1;
        }
@@ -1396,9 +1396,8 @@ static void kernel_read(struct thread *thread)
         * can assume they have the whole message.
         */
        if (rtm->rtm_msglen != nbytes) {
-               zlog_debug(
-                       "kernel_read: rtm->rtm_msglen %d, nbytes %d, type %d",
-                       rtm->rtm_msglen, nbytes, rtm->rtm_type);
+               zlog_debug("%s: rtm->rtm_msglen %d, nbytes %d, type %d",
+                          __func__, rtm->rtm_msglen, nbytes, rtm->rtm_type);
                return;
        }
 
index bf959980be85c4327841b56a1f948526453a885d..93590a2f166786badea22a989b9a9d172b45a4d7 100644 (file)
@@ -227,8 +227,7 @@ static void rtadv_send_packet(int sock, struct interface *ifp,
                adata = calloc(1, CMSG_SPACE(sizeof(struct in6_pktinfo)));
 
                if (adata == NULL) {
-                       zlog_debug(
-                               "rtadv_send_packet: can't malloc control data");
+                       zlog_debug("%s: can't malloc control data", __func__);
                        exit(-1);
                }
        }