summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-05-31 08:13:26 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-05-31 08:13:26 +0200
commitd3e11f79927ee19deef5a264788e8298c7868bd0 (patch)
treee58129f87457f6118262ca9439fb13573d0e2ba4 /src
parentd5df5fb5b8f5e2815405a76ced4b7407988af0d6 (diff)
downloadfastd-d3e11f79927ee19deef5a264788e8298c7868bd0.tar
fastd-d3e11f79927ee19deef5a264788e8298c7868bd0.zip
Fix dump_state()
Diffstat (limited to 'src')
-rw-r--r--src/fastd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fastd.c b/src/fastd.c
index 0797ad8..138731c 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -256,7 +256,7 @@ static void dump_state(void) {
pr_info("dumping peers:");
size_t i;
- for (i = 0; i < VECTOR_LEN(ctx.peers);) {
+ for (i = 0; i < VECTOR_LEN(ctx.peers); i++) {
fastd_peer_t *peer = VECTOR_INDEX(ctx.peers, i);
if (!fastd_peer_is_established(peer)) {
@@ -265,9 +265,9 @@ static void dump_state(void) {
}
if (conf.mode == MODE_TAP) {
- size_t i, eth_addresses = 0;
- for (i = 0; i < VECTOR_LEN(ctx.eth_addrs); i++) {
- if (VECTOR_INDEX(ctx.eth_addrs, i).peer == peer)
+ size_t j, eth_addresses = 0;
+ for (j = 0; j < VECTOR_LEN(ctx.eth_addrs); j++) {
+ if (VECTOR_INDEX(ctx.eth_addrs, j).peer == peer)
eth_addresses++;
}