eigrpd: changes for code maintainability

these changes are for improving the code maintainability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
This commit is contained in:
sri-mohan1 2022-09-12 12:47:01 +05:30
parent 9e5fc01f00
commit 04b267e4e5
3 changed files with 8 additions and 7 deletions

View File

@ -69,8 +69,8 @@ int eigrp_sock_init(struct vrf *vrf)
AF_INET, SOCK_RAW, IPPROTO_EIGRPIGP, vrf->vrf_id,
vrf->vrf_id != VRF_DEFAULT ? vrf->name : NULL);
if (eigrp_sock < 0) {
zlog_err("eigrp_read_sock_init: socket: %s",
safe_strerror(errno));
zlog_err("%s: socket: %s",
__func__, safe_strerror(errno));
exit(1);
}

View File

@ -727,8 +727,8 @@ static struct stream *eigrp_recv_packet(struct eigrp *eigrp,
if ((unsigned int)ret < sizeof(*iph)) /* ret must be > 0 now */
{
zlog_warn(
"eigrp_recv_packet: discarding runt packet of length %d (ip header size is %u)",
ret, (unsigned int)sizeof(*iph));
"%s: discarding runt packet of length %d (ip header size is %u)",
__func__, ret, (unsigned int)sizeof(*iph));
return NULL;
}
@ -772,8 +772,8 @@ static struct stream *eigrp_recv_packet(struct eigrp *eigrp,
if (ret != ip_len) {
zlog_warn(
"eigrp_recv_packet read length mismatch: ip_len is %d, but recvmsg returned %d",
ip_len, ret);
"%s read length mismatch: ip_len is %d, but recvmsg returned %d",
__func__, ip_len, ret);
return NULL;
}

View File

@ -163,7 +163,8 @@ static struct eigrp *eigrp_new(uint16_t as, vrf_id_t vrf_id)
if (eigrp->fd < 0) {
flog_err_sys(
EC_LIB_SOCKET,
"eigrp_new: fatal error: eigrp_sock_init was unable to open a socket");
"%s: fatal error: eigrp_sock_init was unable to open a socket",
__func__);
exit(1);
}