summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-10-22 21:16:44 +0200
committerJan Engelhardt <jengelh@medozas.de>2010-10-22 23:10:54 +0200
commit53bcdb544602074deb17839a75cd35b1fed6d599 (patch)
treee8420edb10153f31d7bdc71ab64fc884e4c14ff7 /src
parentb0967993a76da06d306112bef31d9861b584fa07 (diff)
callback: mnl_cb_run should use a void *
Because in most cases, it won't be a nul-terminated string :) Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
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 f5a6112..4a8fa2d 100644
--- a/src/callback.c
+++ b/src/callback.c
@@ -74,12 +74,12 @@ static const mnl_cb_t default_cb_array[NLMSG_MIN_TYPE] = {
* is set to ESRCH. If the sequence number is not the expected, errno is set
* to EPROTO.
*/
-int mnl_cb_run2(const char *buf, size_t numbytes, unsigned int seq,
+int mnl_cb_run2(const void *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, len = numbytes;
- struct nlmsghdr *nlh = (struct nlmsghdr *)buf;
+ const struct nlmsghdr *nlh = buf;
while (mnl_nlmsg_ok(nlh, len)) {
/* check message source */
@@ -136,7 +136,7 @@ out:
*
* This function propagates the callback return value.
*/
-int mnl_cb_run(const char *buf, size_t numbytes, unsigned int seq,
+int mnl_cb_run(const void *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);