platform/netlink: fix _genl_parse_getfamily() for checking error code from genlmsg_parse()

Errors are negative numbers.

This had no effect however, because currently genlmsg_parse() won't ever return
positive values.
This commit is contained in:
Thomas Haller 2019-02-15 12:34:54 +01:00
parent 98e6abb5a0
commit 106e4ebc13

View file

@ -733,7 +733,7 @@ _genl_parse_getfamily (struct nl_msg *msg, void *arg)
struct nlmsghdr *nlh = nlmsg_hdr (msg);
gint32 *response_data = arg;
if (genlmsg_parse (nlh, 0, tb, CTRL_ATTR_MAX, ctrl_policy))
if (genlmsg_parse (nlh, 0, tb, CTRL_ATTR_MAX, ctrl_policy) < 0)
return NL_SKIP;
if (tb[CTRL_ATTR_FAMILY_ID])