From: Guus Sliepen Date: Wed, 30 Jul 2014 13:04:22 +0000 (+0200) Subject: meshlink_send()'s len argument should be size_t, to match send(). X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=af4e695cd293611a21bf983006132070c21c2d80;p=meshlink meshlink_send()'s len argument should be size_t, to match send(). --- 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.