From 920ab8c98a4d81d97171d28be77e40373e3d9d61 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Thu, 11 Aug 2011 18:23:13 +0000 Subject: initialize some variables to get rid of warnings when compiling with optimization --- userspace/ebtables2/communication.c | 6 +++--- userspace/ebtables2/ebtables.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/userspace/ebtables2/communication.c b/userspace/ebtables2/communication.c index 3311358..0917f6e 100644 --- a/userspace/ebtables2/communication.c +++ b/userspace/ebtables2/communication.c @@ -293,7 +293,7 @@ void ebt_deliver_counters(struct ebt_u_replace *u_repl) socklen_t optlen; struct ebt_replace repl; struct ebt_cntchanges *cc = u_repl->cc->next, *cc2; - struct ebt_u_entries *entries; + struct ebt_u_entries *entries = NULL; struct ebt_u_entry *next = NULL; int i, chainnr = 0; @@ -708,8 +708,8 @@ int ebt_get_table(struct ebt_u_replace *u_repl, int init) { int i, j, k, hook; struct ebt_replace repl; - struct ebt_u_entry *u_e; - struct ebt_cntchanges *new_cc, *cc; + struct ebt_u_entry *u_e = NULL; + struct ebt_cntchanges *new_cc = NULL, *cc; strcpy(repl.name, u_repl->name); if (u_repl->filename != NULL) { diff --git a/userspace/ebtables2/ebtables.c b/userspace/ebtables2/ebtables.c index d5d24b0..62f1ba8 100644 --- a/userspace/ebtables2/ebtables.c +++ b/userspace/ebtables2/ebtables.c @@ -541,7 +541,7 @@ int do_command(int argc, char *argv[], int exec_style, char *buffer; int c, i; int zerochain = -1; /* Needed for the -Z option (we can have -Z -L ) */ - int chcounter; /* Needed for -C */ + int chcounter = 0; /* Needed for -C */ int policy = 0; int rule_nr = 0; int rule_nr_end = 0; -- cgit v1.2.3