Calling mnl_attr_parse with cb==NULL is pointless, because the function will do nothing else. Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx> --- src/attr.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/attr.c b/src/attr.c index 69fda0b..e22a8ac 100644 --- a/src/attr.c +++ b/src/attr.c @@ -260,7 +260,7 @@ int mnl_attr_parse(const struct nlmsghdr *nlh, unsigned int offset, int len = nlh->nlmsg_len - MNL_NLMSG_HDRLEN - MNL_ALIGN(offset); while (mnl_attr_ok(attr, len)) { - if (cb && (ret = cb(attr, data)) <= MNL_CB_STOP) + if ((ret = cb(attr, data)) <= MNL_CB_STOP) return ret; attr = mnl_attr_next(attr, &len); } @@ -289,7 +289,7 @@ int mnl_attr_parse_nested(const struct nlattr *nested, int len = mnl_attr_get_payload_len(nested); while (mnl_attr_ok(attr, len)) { - if (cb && (ret = cb(attr, data)) <= MNL_CB_STOP) + if ((ret = cb(attr, data)) <= MNL_CB_STOP) return ret; attr = mnl_attr_next(attr, &len); } -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html