diff options
-rw-r--r-- | source3/client/clitar.c | 2 | ||||
-rw-r--r-- | source3/torture/torture.c | 8 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c index c7f2819c88..fd6c4ccef9 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -789,7 +789,7 @@ static void do_atar(const char *rname_in,char *lname,file_info *finfo1) cleanup: - if (fnum != -1) { + if (fnum != (uint16_t)-1) { cli_close(cli, fnum); fnum = -1; } diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 1f8ef7ecfb..be2a854aaf 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -553,7 +553,7 @@ static bool rw_torture3(struct cli_state *c, char *lockfname) } else { - for (i = 0; i < 500 && fnum == -1; i++) + for (i = 0; i < 500 && fnum == (uint16_t)-1; i++) { status = cli_open(c, lockfname, O_RDONLY, DENY_NONE, &fnum); @@ -3380,8 +3380,8 @@ static bool run_deletetest(int dummy) * intialized, because these functions don't handle * uninitialized connections. */ - if (fnum1 != -1) cli_close(cli1, fnum1); - if (fnum2 != -1) cli_close(cli1, fnum2); + if (fnum1 != (uint16_t)-1) cli_close(cli1, fnum1); + if (fnum2 != (uint16_t)-1) cli_close(cli1, fnum2); cli_setatr(cli1, fname, 0, 0); cli_unlink(cli1, fname, aSYSTEM | aHIDDEN); @@ -3835,7 +3835,7 @@ static bool run_opentest(int dummy) printf("testing ctemp\n"); fnum1 = cli_ctemp(cli1, "\\", &tmp_path); - if (fnum1 == -1) { + if (fnum1 == (uint16_t)-1) { printf("ctemp failed (%s)\n", cli_errstr(cli1)); return False; } diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 8689a09e20..9f4470b60d 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -4319,7 +4319,7 @@ static void show_userlist(struct rpc_pipe_client *pipe_hnd, d_printf(" %s\n", tokens[i].name); } - if (fnum != -1) + if (fnum != (uint16_t)-1) cli_close(cli, fnum); cli_tdis(cli); cli->cnum = cnum; |