From 49c94c3490fe2691293a8d45b3dab574ee73ca31 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=9A=D0=BE=D1=80=D0=B5=D0=BD=D0=B1=D0=B5=D1=80=D0=B3=20?= =?utf8?q?=D0=9C=D0=B0=D1=80=D0=BA?= Date: Thu, 30 Aug 2012 22:53:19 +0600 Subject: [PATCH] genl_ctrl_probe_by_name: fix checking of genlmsg_put() return value It's a pointer! not an error code :) nasty bugs --- lib/genl/ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/genl/ctrl.c b/lib/genl/ctrl.c index 5950394..057a1bf 100644 --- a/lib/genl/ctrl.c +++ b/lib/genl/ctrl.c @@ -255,8 +255,8 @@ static struct genl_family *genl_ctrl_probe_by_name(struct nl_sock *sk, if (!(cb = nl_cb_clone(nl_socket_get_cb(sk)))) goto out_msg_free; - if (genlmsg_put(msg, NL_AUTO_PORT, NL_AUTO_SEQ, GENL_ID_CTRL, - 0, 0, CTRL_CMD_GETFAMILY, 1) < 0) { + if (!genlmsg_put(msg, NL_AUTO_PORT, NL_AUTO_SEQ, GENL_ID_CTRL, + 0, 0, CTRL_CMD_GETFAMILY, 1)) { BUG(); goto out_cb_free; } -- 2.40.0