Compiling with -Wsign-compare complains:
ctdb/server/ctdb_daemon.c: scope_hint: In function ‘daemon_queue_send’
ctdb/server/ctdb_daemon.c:259:40: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
...
The struct ctdb_queue member out_queue_length is actually uint32_t, so
just return that type.
Found by csbuild.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
typedef void (*ctdb_queue_cb_fn_t)(uint8_t *data, size_t length,
void *private_data);
-int ctdb_queue_length(struct ctdb_queue *queue);
+uint32_t ctdb_queue_length(struct ctdb_queue *queue);
int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length);
-int ctdb_queue_length(struct ctdb_queue *queue)
+uint32_t ctdb_queue_length(struct ctdb_queue *queue)
{
return queue->out_queue_length;
}