summaryrefslogtreecommitdiff
path: root/zebra/kernel_netlink.c
diff options
context:
space:
mode:
authorOlivier Dugeon <olivier.dugeon@orange.com>2017-06-21 18:22:52 +0200
committerGitHub <noreply@github.com>2017-06-21 18:22:52 +0200
commit8ea37652c714edcd913d5dc02a0bfc5968fdc45e (patch)
tree86e8e62d8b64dbe4d1bf7e5a96b0572e149f4832 /zebra/kernel_netlink.c
parent2ca02077216cc8d8bde6b6da279f9fd03e0ac04a (diff)
parent56b40679304df9c4bfcfd5764af24f1d35b86142 (diff)
Merge pull request #745 from qlyoung/fix-lookup
*: simplify log message lookup
Diffstat (limited to 'zebra/kernel_netlink.c')
-rw-r--r--zebra/kernel_netlink.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index e23801169b..be9376b07f 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -83,7 +83,7 @@ static const struct message nlmsg_str[] = {
{RTM_NEWNEIGH, "RTM_NEWNEIGH"},
{RTM_DELNEIGH, "RTM_DELNEIGH"},
{RTM_GETNEIGH, "RTM_GETNEIGH"},
- {0, NULL}
+ { 0 }
};
static const struct message rtproto_str[] = {
@@ -104,7 +104,7 @@ static const struct message rtproto_str[] = {
{RTPROT_ISIS, "IS-IS"},
{RTPROT_RIP, "RIP"},
{RTPROT_RIPNG, "RIPNG"},
- {0, NULL}
+ { 0 }
};
static const struct message family_str[] = {
@@ -113,13 +113,13 @@ static const struct message family_str[] = {
{AF_BRIDGE, "bridge"},
{RTNL_FAMILY_IPMR, "ipv4MR"},
{RTNL_FAMILY_IP6MR, "ipv6MR"},
- {0, NULL},
+ { 0 }
};
static const struct message rttype_str[] = {
{RTN_UNICAST, "unicast"},
{RTN_MULTICAST, "multicast"},
- {0, NULL},
+ { 0 }
};
extern struct thread_master *master;
@@ -425,25 +425,25 @@ rta_nest_end(struct rtattr *rta, struct rtattr *nest)
const char *
nl_msg_type_to_str (uint16_t msg_type)
{
- return lookup (nlmsg_str, msg_type);
+ return lookup_msg (nlmsg_str, msg_type, "");
}
const char *
nl_rtproto_to_str (u_char rtproto)
{
- return lookup (rtproto_str, rtproto);
+ return lookup_msg (rtproto_str, rtproto, "");
}
const char *
nl_family_to_str (u_char family)
{
- return lookup (family_str, family);
+ return lookup_msg (family_str, family, "");
}
const char *
nl_rttype_to_str (u_char rttype)
{
- return lookup (rttype_str, rttype);
+ return lookup_msg (rttype_str, rttype, "");
}
/*