summaryrefslogtreecommitdiffstats
path: root/src/fastd.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-24 03:17:46 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-24 03:17:46 +0200
commit4872dd03e73aac434d735782417e40ca33336dac (patch)
tree8c8a20da4b077e60ed26aa393fd7c39c4e8dacde /src/fastd.c
parentbaf9b2fd6096e5e8eee45b9f2feffa9adec6e927 (diff)
downloadfastd-4872dd03e73aac434d735782417e40ca33336dac.tar
fastd-4872dd03e73aac434d735782417e40ca33336dac.zip
Always use size_t for counters
Diffstat (limited to 'src/fastd.c')
-rw-r--r--src/fastd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/fastd.c b/src/fastd.c
index e8b4677..5c63ec6 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -185,7 +185,7 @@ static void close_log(void) {
static void init_sockets(void) {
ctx.socks = malloc(conf.n_bind_addrs * sizeof(fastd_socket_t));
- unsigned i;
+ size_t i;
fastd_bind_address_t *addr = conf.bind_addrs;
for (i = 0; i < conf.n_bind_addrs; i++) {
ctx.socks[i] = (fastd_socket_t){ .fd = -2, .addr = addr };
@@ -222,7 +222,7 @@ void fastd_setfl(const int fd, int set, int unset) {
}
static void close_sockets(void) {
- unsigned i;
+ size_t i;
for (i = 0; i < ctx.n_socks; i++)
fastd_socket_close(&ctx.socks[i]);
@@ -385,8 +385,7 @@ static void dump_state(void) {
}
if (conf.mode == MODE_TAP) {
- unsigned int eth_addresses = 0;
- size_t i;
+ 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)
eth_addresses++;