summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-04-22 13:55:24 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-04-22 13:55:24 +0200
commit42e93dab699c82d3766a1662da06d0e5855667d6 (patch)
treee1b06fff60fb2bc66333a1247008b7855e14491b /src
parentb262957ad4cadb579e4ee463a6235ab6fc1c0cf9 (diff)
downloadlibmnl-42e93dab699c82d3766a1662da06d0e5855667d6.tar.gz
fix warning in mnl_cb_run2()
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 <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/callback.c6
1 files 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;