diff options
author | Thomas Haller <thaller@redhat.com> | 2018-12-27 14:27:51 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-01-09 16:46:41 +0100 |
commit | 7a105c2191a00f077539b4948453d032b9018097 (patch) | |
tree | 1556d4698b4fb57558cebea68f674cf70e2b47e6 | |
parent | 0713a6996c19d4d02ef048ab93278bc1f5e33c09 (diff) | |
download | NetworkManager-7a105c2191a00f077539b4948453d032b9018097.tar.gz |
netlink: don't require a callback argument in nl_recvmsgs()
-rw-r--r-- | src/platform/nm-netlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platform/nm-netlink.c b/src/platform/nm-netlink.c index 72f7c73495..6abc1c3a34 100644 --- a/src/platform/nm-netlink.c +++ b/src/platform/nm-netlink.c @@ -1055,7 +1055,7 @@ nl_wait_for_ack (struct nl_sock *sk, do { \ const struct nl_cb *_cb = (cb); \ \ - if (_cb->type##_cb) { \ + if (_cb && _cb->type##_cb) { \ /* the returned value here must be either a negative * netlink error number, or one of NL_SKIP, NL_STOP, NL_OK. */ \ nmerr = _cb->type##_cb ((msg), _cb->type##_arg); \ @@ -1171,7 +1171,7 @@ continue_reading: } if (e->error) { /* Error message reported back from kernel. */ - if (cb->err_cb) { + if (cb && cb->err_cb) { /* the returned value here must be either a negative * netlink error number, or one of NL_SKIP, NL_STOP, NL_OK. */ nmerr = cb->err_cb (&nla, e, |