From 14a8a1e7dd1301002c99598a2b067cde3ca19b6e Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Thu, 31 Jul 2008 10:41:57 +0200 Subject: cleanup: fix compilation warning related to signed and unsigned comparisons This patch fixes the warning related to signed and unsigned comparaison. Signed-off-by: Eric Leblond --- src/conffile.c | 4 ++-- src/ulogd.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/conffile.c b/src/conffile.c index 72afb8e..0c1a2a4 100644 --- a/src/conffile.c +++ b/src/conffile.c @@ -112,7 +112,7 @@ int config_parse_file(const char *section, struct config_keyset *kset) char *args; int err = 0; int found = 0; - int i; + unsigned int i; char linebuf[LINE_LEN+1]; char *line = linebuf; @@ -147,7 +147,7 @@ int config_parse_file(const char *section, struct config_keyset *kset) /* Parse this section until next section */ while (fgets(line, LINE_LEN, cfile)) { - int i; + unsigned int i; char wordbuf[LINE_LEN]; char *wordend; diff --git a/src/ulogd.c b/src/ulogd.c index 33d58ee..429f472 100644 --- a/src/ulogd.c +++ b/src/ulogd.c @@ -204,7 +204,7 @@ int ulogd_wildcard_inputkeys(struct ulogd_pluginstance *upi) /* second pass: copy key names */ llist_for_each_entry(pi_cur, &stack->list, list) { - int i; + unsigned int i; for (i = 0; i < pi_cur->plugin->output.num_keys; i++) upi->input.keys[index++] = pi_cur->output.keys[i]; @@ -280,7 +280,7 @@ char *type_to_string(int type) void get_plugin_infos(struct ulogd_plugin *me) { - int i; + unsigned int i; printf("Name: %s\n", me->name); if (me->config_kset) { printf("Config options:\n"); @@ -453,7 +453,7 @@ static void ulogd_clean_results(struct ulogd_pluginstance *pi) /* iterate through plugin stack */ llist_for_each_entry(cur, &pi->stack->list, list) { - int i; + unsigned int i; /* iterate through input keys of pluginstance */ for (i = 0; i < cur->output.num_keys; i++) { @@ -598,7 +598,7 @@ find_okey_in_stack(char *name, struct ulogd_pluginstance *pi; llist_for_each_entry_reverse(pi, &start->list, list) { - int i; + unsigned int i; if ((void *)&pi->list == &stack->list) return NULL; @@ -666,7 +666,7 @@ create_stack_resolve_keys(struct ulogd_pluginstance_stack *stack) } /* no need to match keys */ } else { - int j; + unsigned int j; /* not the last one in the stack */ if (!(pi_cur->plugin->input.type & -- cgit v1.2.3