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

ctdb-common: Remove signed/unsigned comparisons

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2020-02-17 17:00:47 +11:00 committed by Amitay Isaacs
parent 195e88cea3
commit c16da0e8f0

View File

@ -39,7 +39,7 @@ struct cmdline_context {
struct poptOption *options;
struct cmdline_section *section;
int num_sections;
int max_len;
size_t max_len;
poptContext pc;
int argc, arg0;
const char **argv;
@ -178,7 +178,7 @@ static bool cmdline_command_check(struct cmdline_command *cmd, size_t *max_len)
}
if (len > *max_len) {
*max_len = (int)len;
*max_len = len;
}
len = strlen(cmd->msg_help);
@ -490,14 +490,14 @@ static void cmdline_usage_command(struct cmdline_context *cmdline,
struct cmdline_command *cmd,
bool print_all)
{
int len;
size_t len;
len = (int)strlen(cmd->name);
len = strlen(cmd->name);
printf(" %s ", cmd->name);
if (print_all) {
printf("%-*s",
cmdline->max_len-len,
(int)(cmdline->max_len-len),
cmd->msg_args == NULL ? "" : cmd->msg_args);
} else {
printf("%s", cmd->msg_args == NULL ? "" : cmd->msg_args);