diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-24 03:17:46 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-24 03:17:46 +0200 |
commit | 4872dd03e73aac434d735782417e40ca33336dac (patch) | |
tree | 8c8a20da4b077e60ed26aa393fd7c39c4e8dacde /src/fastd.c | |
parent | baf9b2fd6096e5e8eee45b9f2feffa9adec6e927 (diff) | |
download | fastd-4872dd03e73aac434d735782417e40ca33336dac.tar fastd-4872dd03e73aac434d735782417e40ca33336dac.zip |
Always use size_t for counters
Diffstat (limited to 'src/fastd.c')
-rw-r--r-- | src/fastd.c | 7 |
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++; |