From af4e695cd293611a21bf983006132070c21c2d80 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Wed, 30 Jul 2014 15:04:22 +0200 Subject: [PATCH 1/1] meshlink_send()'s len argument should be size_t, to match send(). --- src/meshlink.c | 2 +- src/meshlink.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/meshlink.c b/src/meshlink.c index a49aa578..4031075b 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -889,7 +889,7 @@ void meshlink_set_log_cb(meshlink_handle_t *mesh, meshlink_log_level_t level, me mesh->log_level = level; } -bool meshlink_send(meshlink_handle_t *mesh, meshlink_node_t *destination, const void *data, unsigned int len) { +bool meshlink_send(meshlink_handle_t *mesh, meshlink_node_t *destination, const void *data, size_t len) { if(!mesh || !destination) return false; if(!len) diff --git a/src/meshlink.h b/src/meshlink.h index ebd33036..b938ca38 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -238,7 +238,8 @@ extern void meshlink_set_log_cb(meshlink_handle_t *mesh, meshlink_log_level_t le * @return This function will return true if MeshLink has queued the message for transmission, and false otherwise. * A return value of true does not guarantee that the message will actually arrive at the destination. */ -extern bool meshlink_send(meshlink_handle_t *mesh, meshlink_node_t *destination, const void *data, unsigned int len); +extern bool meshlink_send(meshlink_handle_t *mesh, meshlink_node_t *destination, const void *data, size_t len); + /// Get a handle for a specific node. /** This function returns a handle for the node with the given name. -- 2.39.2