From 42e93dab699c82d3766a1662da06d0e5855667d6 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 22 Apr 2010 13:55:24 +0200 Subject: fix warning in mnl_cb_run2() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit callback.c: In function ‘mnl_cb_run2’: callback.c:106: warning: pointer targets in passing argument 2 of ‘mnl_nlmsg_next’ differ in signednes Signed-off-by: Pablo Neira Ayuso --- src/callback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/callback.c b/src/callback.c index 9fba13a..4a73857 100644 --- a/src/callback.c +++ b/src/callback.c @@ -70,10 +70,10 @@ int mnl_cb_run2(const char *buf, size_t numbytes, unsigned int seq, unsigned int portid, mnl_cb_t cb_data, void *data, mnl_cb_t *cb_ctl_array, unsigned int cb_ctl_array_len) { - int ret = MNL_CB_OK; + int ret = MNL_CB_OK, len = numbytes; struct nlmsghdr *nlh = (struct nlmsghdr *)buf; - while (mnl_nlmsg_ok(nlh, numbytes)) { + while (mnl_nlmsg_ok(nlh, len)) { /* check message source */ if (!mnl_nlmsg_portid_ok(nlh, portid)) { errno = EINVAL; @@ -103,7 +103,7 @@ int mnl_cb_run2(const char *buf, size_t numbytes, unsigned int seq, if (ret <= MNL_CB_STOP) goto out; } - nlh = mnl_nlmsg_next(nlh, &numbytes); + nlh = mnl_nlmsg_next(nlh, &len); } out: return ret; -- cgit v1.2.3