Commit 9c5c1090 authored by Luotao Fu's avatar Luotao Fu

change fixed char size in strncmp

Signed-off-by: 's avatarLuotao Fu <l.fu@pengutronix.de>
parent 12a155aa
......@@ -307,7 +307,7 @@ static int do_get_nl_link(int fd, __u8 acquire, const char *name, void *res)
nl_msg->nlmsg_len - NLMSG_LENGTH(sizeof(struct ifaddrmsg));
parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len);
if (strncmp((char *)RTA_DATA(tb[IFLA_IFNAME]), name, 4) != 0)
if (strncmp((char *)RTA_DATA(tb[IFLA_IFNAME]), name, sizeof(name)) != 0)
continue;
if (tb[IFLA_LINKINFO])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment