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

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>
This commit is contained in:
Martin Schwenke 2019-05-22 21:55:56 +10:00 committed by Amitay Isaacs
parent 887dc174f2
commit 2be15d3c61
4 changed files with 11 additions and 10 deletions

View File

@ -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);

View File

@ -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];

View File

@ -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)
{

View File

@ -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);