Simple cases where a variable (usually a loop variable) needs to be
declared as an unsigned type (unsigned int or size_t) instead of an
int.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
return 0;
}
-static bool cmdline_command_check(struct cmdline_command *cmd, int *max_len)
+static bool cmdline_command_check(struct cmdline_command *cmd, size_t *max_len)
{
size_t len;
}
static bool cmdline_commands_check(struct cmdline_command *commands,
- int *max_len)
+ size_t *max_len)
{
int i;
bool ok;
struct cmdline_context **result)
{
struct cmdline_context *cmdline;
- int ret, max_len = 0;
+ int ret;
+ size_t max_len = 0;
bool ok;
if (prog == NULL) {
bool debug_level_parse(const char *log_string, int *log_level)
{
- int i;
+ size_t i;
if (log_string == NULL) {
return false;
const char *debug_level_to_string(int log_level)
{
- int i;
+ size_t i;
for (i=0; i < ARRAY_SIZE(log_string_map); i++) {
if (log_string_map[i].log_level == log_level) {
{
struct log_backend *b = NULL;
char *t, *name, *option;
- int i;
+ size_t i;
t = talloc_strdup(mem_ctx, logging);
if (t == NULL) {
const char *arg_str, const char ***out)
{
const char **argv;
- int argc;
+ size_t argc;
size_t len;
/* Preallocate argv array to avoid reallocation. */
{
struct event_script_list *s_list;
struct run_event_script_list *script_list;
- int ret, i;
+ unsigned int i;
+ int ret;
ret = event_script_get_list(mem_ctx,
run_event_script_dir(run_ctx),