1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-common: Return value of ctdb_queue_length() should be unsigned

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>
This commit is contained in:
Martin Schwenke 2019-08-01 10:46:36 +10:00 committed by Amitay Isaacs
parent f7f9f57d2e
commit 5a3d99dc7a
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@
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);

View File

@ -72,7 +72,7 @@ struct ctdb_queue {
int ctdb_queue_length(struct ctdb_queue *queue)
uint32_t ctdb_queue_length(struct ctdb_queue *queue)
{
return queue->out_queue_length;
}