From 9ad5f22842364ac63d0e915accc1389c51f3606a Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 22 Apr 2010 13:24:01 +0200 Subject: use size_t to indicate the buffer size in mnl_cb_run*() Signed-off-by: Pablo Neira Ayuso --- include/libmnl/libmnl.h | 4 ++-- src/callback.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h index af7d30b..cf91739 100644 --- a/include/libmnl/libmnl.h +++ b/include/libmnl/libmnl.h @@ -138,10 +138,10 @@ extern int mnl_attr_parse_nested(const struct nlattr *attr, mnl_attr_cb_t cb, vo typedef int (*mnl_cb_t)(const struct nlmsghdr *nlh, void *data); -extern int mnl_cb_run(const char *buf, int numbytes, unsigned int seq, +extern int mnl_cb_run(const char *buf, size_t numbytes, unsigned int seq, unsigned int portid, mnl_cb_t cb_data, void *data); -extern int mnl_cb_run2(const char *buf, int numbytes, unsigned int seq, +extern 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); diff --git a/src/callback.c b/src/callback.c index a8818ba..9fba13a 100644 --- a/src/callback.c +++ b/src/callback.c @@ -66,7 +66,7 @@ static mnl_cb_t default_cb_array[NLMSG_MIN_TYPE] = { * * This function propagates the callback return value. */ -int mnl_cb_run2(const char *buf, int numbytes, unsigned int seq, +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) { @@ -128,7 +128,7 @@ out: * * This function propagates the callback return value. */ -int mnl_cb_run(const char *buf, int numbytes, unsigned int seq, +int mnl_cb_run(const char *buf, size_t numbytes, unsigned int seq, unsigned int portid, mnl_cb_t cb_data, void *data) { return mnl_cb_run2(buf, numbytes, seq, portid, cb_data, data, NULL, 0); -- cgit v1.2.3