diff options
author | Martin Schwenke <martin@meltin.net> | 2019-05-22 21:55:56 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2019-06-05 10:25:50 +0000 |
commit | 2be15d3c61f643666f9b3a845487125d801c134f (patch) | |
tree | 8d35efde438c755722d3f7f3605fb74363f9ba79 /ctdb/client | |
parent | 887dc174f2320de2318d8bd56f1b58c95c10519e (diff) | |
download | samba-2be15d3c61f643666f9b3a845487125d801c134f.tar.gz |
ctdb-client: Fix signed/unsigned comparisons by declaring as unsigned
Simple cases where a variables and function parameters need to be
declared as an unsigned type instead of an int.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/client')
-rw-r--r-- | ctdb/client/client.h | 8 | ||||
-rw-r--r-- | ctdb/client/client_db.c | 3 | ||||
-rw-r--r-- | ctdb/client/client_tunnel.c | 8 | ||||
-rw-r--r-- | ctdb/client/client_util.c | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/ctdb/client/client.h b/ctdb/client/client.h index d4d145045e0..0df76a66e46 100644 --- a/ctdb/client/client.h +++ b/ctdb/client/client.h @@ -691,7 +691,7 @@ int ctdb_tunnel_destroy(struct tevent_context *ev, struct tevent_req *ctdb_tunnel_request_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct ctdb_tunnel_context *tctx, - int destnode, + uint32_t destnode, struct timeval timeout, uint8_t *buf, size_t buflen, bool wait_for_reply); @@ -724,7 +724,7 @@ bool ctdb_tunnel_request_recv(struct tevent_req *req, int *perr, * @return 0 on success, errno on failure */ int ctdb_tunnel_request(TALLOC_CTX *mem_ctx, struct tevent_context *ev, - struct ctdb_tunnel_context *tctx, int destnode, + struct ctdb_tunnel_context *tctx, uint32_t destnode, struct timeval timeout, uint8_t *buf, size_t buflen, bool wait_for_reply); @@ -744,7 +744,7 @@ int ctdb_tunnel_request(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct tevent_req *ctdb_tunnel_reply_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct ctdb_tunnel_context *tctx, - int destnode, uint32_t reqid, + uint32_t destnode, uint32_t reqid, struct timeval timeout, uint8_t *buf, size_t buflen); @@ -771,7 +771,7 @@ bool ctdb_tunnel_reply_recv(struct tevent_req *req, int *perr); * @return 0 on success, errno on failure */ int ctdb_tunnel_reply(TALLOC_CTX *mem_ctx, struct tevent_context *ev, - struct ctdb_tunnel_context *tctx, int destnode, + struct ctdb_tunnel_context *tctx, uint32_t destnode, uint32_t reqid, struct timeval timeout, uint8_t *buf, size_t buflen); diff --git a/ctdb/client/client_db.c b/ctdb/client/client_db.c index c0ecdeb2d30..c9ddde3d422 100644 --- a/ctdb/client/client_db.c +++ b/ctdb/client/client_db.c @@ -2018,7 +2018,8 @@ static int ctdb_g_lock_unlock_update(struct tevent_req *req) struct ctdb_g_lock_unlock_state *state = tevent_req_data( req, struct ctdb_g_lock_unlock_state); struct ctdb_g_lock *lock; - int ret, i; + unsigned int i; + int ret; for (i=0; i<state->lock_list->num; i++) { lock = &state->lock_list->lock[i]; diff --git a/ctdb/client/client_tunnel.c b/ctdb/client/client_tunnel.c index a783afe47c8..13c35fb61be 100644 --- a/ctdb/client/client_tunnel.c +++ b/ctdb/client/client_tunnel.c @@ -392,7 +392,7 @@ static void ctdb_tunnel_request_done(struct tevent_req *subreq); struct tevent_req *ctdb_tunnel_request_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct ctdb_tunnel_context *tctx, - int destnode, + uint32_t destnode, struct timeval timeout, uint8_t *buf, size_t buflen, bool wait_for_reply) @@ -544,7 +544,7 @@ bool ctdb_tunnel_request_recv(struct tevent_req *req, int *perr, } int ctdb_tunnel_request(TALLOC_CTX *mem_ctx, struct tevent_context *ev, - struct ctdb_tunnel_context *tctx, int destnode, + struct ctdb_tunnel_context *tctx, uint32_t destnode, struct timeval timeout, uint8_t *buf, size_t buflen, bool wait_for_reply) { @@ -577,7 +577,7 @@ static void ctdb_tunnel_reply_done(struct tevent_req *subreq); struct tevent_req *ctdb_tunnel_reply_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct ctdb_tunnel_context *tctx, - int destnode, uint32_t reqid, + uint32_t destnode, uint32_t reqid, struct timeval timeout, uint8_t *buf, size_t buflen) { @@ -667,7 +667,7 @@ bool ctdb_tunnel_reply_recv(struct tevent_req *req, int *perr) } int ctdb_tunnel_reply(TALLOC_CTX *mem_ctx, struct tevent_context *ev, - struct ctdb_tunnel_context *tctx, int destnode, + struct ctdb_tunnel_context *tctx, uint32_t destnode, uint32_t reqid, struct timeval timeout, uint8_t *buf, size_t buflen) { diff --git a/ctdb/client/client_util.c b/ctdb/client/client_util.c index c68135f0af9..35323ff9eac 100644 --- a/ctdb/client/client_util.c +++ b/ctdb/client/client_util.c @@ -41,7 +41,7 @@ int list_of_nodes(struct ctdb_node_map *nodemap, { int num_nodes = 0; uint32_t *list; - int i; + unsigned int i; /* Allocate the list of same number of nodes */ list = talloc_array(mem_ctx, uint32_t, nodemap->num); |