summaryrefslogtreecommitdiffstats
path: root/ebtables.c
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2002-06-25 15:43:57 +0000
committerBart De Schuymer <bdschuym@pandora.be>2002-06-25 15:43:57 +0000
commitf8f8f293237027e8d4798545e9cb2f8a6bd0124f (patch)
treeee60996831f037ddc649a61dee729fd0080d49be /ebtables.c
parent1a0a9c39b4ded301ccce1c796ba6d381562d248b (diff)
minor bugfix
Diffstat (limited to 'ebtables.c')
-rw-r--r--ebtables.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ebtables.c b/ebtables.c
index 48861f3..aac9762 100644
--- a/ebtables.c
+++ b/ebtables.c
@@ -518,7 +518,7 @@ static void list_em(struct ebt_u_entries *entries)
printf("nr. of entries: %d \n", entries->nentries);
i = entries->nentries;
- while (i >9) {
+ while (i > 9) {
space++;
i /= 10;
}
@@ -526,6 +526,7 @@ static void list_em(struct ebt_u_entries *entries)
for (i = 0; i < entries->nentries; i++) {
digits = 0;
// A little work to get nice rule numbers.
+ j = i + 1;
while (j > 9) {
digits++;
j /= 10;
@@ -969,11 +970,11 @@ static int flush_chains()
if ( !(counterchanges = (unsigned short *)
malloc((oldnentries + 1) * sizeof(unsigned short))) )
print_memory();
- cnt = counterchanges;
}
// delete the counters belonging to the specified chain,
// update counter_offset
i = -1;
+ cnt = counterchanges;
while (1) {
i++;
entries = nr_to_chain(i);
@@ -1511,7 +1512,7 @@ int main(int argc, char *argv[])
int c, i;
// this special one for the -Z option (we can have -Z <this> -L <that>)
int zerochain = -1;
- int policy;
+ int policy = 0;
int rule_nr = -1;// used for -D chain number
struct ebt_u_target *t;
struct ebt_u_match *m;