diff options
author | Martin Schwenke <martin@meltin.net> | 2019-08-01 10:46:36 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2019-08-14 09:11:36 +0000 |
commit | 5a3d99dc7ad49717252d8c9625e0f8d064cffcd8 (patch) | |
tree | 7ba3b2e25622ddee76f3a5498bcc928a224105ee /ctdb/common | |
parent | f7f9f57d2e13e7ced1f2237273965af8dfc29335 (diff) | |
download | samba-5a3d99dc7ad49717252d8c9625e0f8d064cffcd8.tar.gz |
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>
Diffstat (limited to 'ctdb/common')
-rw-r--r-- | ctdb/common/common.h | 2 | ||||
-rw-r--r-- | ctdb/common/ctdb_io.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/common/common.h b/ctdb/common/common.h index 79f6b9ed03a..c50b52a5eb5 100644 --- a/ctdb/common/common.h +++ b/ctdb/common/common.h @@ -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); diff --git a/ctdb/common/ctdb_io.c b/ctdb/common/ctdb_io.c index c16eb7f67b7..000f71e4c20 100644 --- a/ctdb/common/ctdb_io.c +++ b/ctdb/common/ctdb_io.c @@ -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; } |