summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-03-07 23:18:11 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-03-07 23:18:11 +0100
commit4b707f3076d0208a860e8c4fa5e05a85e09a2102 (patch)
treea7b362832664057b82ef8f8259e4ff7eedbb4ee7
parent6ada3f4364395fac6c9a64e73492d8826a000127 (diff)
downloadfastd-4b707f3076d0208a860e8c4fa5e05a85e09a2102.tar
fastd-4b707f3076d0208a860e8c4fa5e05a85e09a2102.zip
Fixed off-by-one in fastd_peer_eth_addr_add
-rw-r--r--src/peer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/peer.c b/src/peer.c
index 6fe1aa2..5be79bb 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -225,7 +225,7 @@ void fastd_peer_eth_addr_add(fastd_context *ctx, fastd_peer *peer, const fastd_e
}
int i;
- for (i = ctx->n_eth_addr-1; i > min+1; i--)
+ for (i = ctx->n_eth_addr-1; i > min; i--)
ctx->eth_addr[i] = ctx->eth_addr[i-1];
ctx->eth_addr[min] = (fastd_peer_eth_addr){ *addr, peer, ctx->now };