Commit e7eb95be authored by Antonin Décimo's avatar Antonin Décimo Committed by Juliusz Chroboczek

Explicitly check strncmp return code.

parent 0ae38efc
...@@ -61,8 +61,8 @@ static int family_handler(struct nl_msg *msg, void *arg) ...@@ -61,8 +61,8 @@ static int family_handler(struct nl_msg *msg, void *arg)
if (!tb_mcgrp[CTRL_ATTR_MCAST_GRP_NAME] || if (!tb_mcgrp[CTRL_ATTR_MCAST_GRP_NAME] ||
!tb_mcgrp[CTRL_ATTR_MCAST_GRP_ID]) !tb_mcgrp[CTRL_ATTR_MCAST_GRP_ID])
continue; continue;
if (strncmp(nla_data(tb_mcgrp[CTRL_ATTR_MCAST_GRP_NAME]), if (strncmp(nla_data(tb_mcgrp[CTRL_ATTR_MCAST_GRP_NAME]), grp->group,
grp->group, nla_len(tb_mcgrp[CTRL_ATTR_MCAST_GRP_NAME]))) nla_len(tb_mcgrp[CTRL_ATTR_MCAST_GRP_NAME])) != 0)
continue; continue;
grp->id = nla_get_u32(tb_mcgrp[CTRL_ATTR_MCAST_GRP_ID]); grp->id = nla_get_u32(tb_mcgrp[CTRL_ATTR_MCAST_GRP_ID]);
break; break;
......
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