From 4c9475346974581a4fab96c7fa0c5493b33602eb Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Fri, 12 Nov 2010 11:31:16 +0100 Subject: [PATCH] Minor compile fixes. --- src/adc/sid.c | 3 ++- src/core/commands.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/adc/sid.c b/src/adc/sid.c index 5531bec..f334516 100644 --- a/src/adc/sid.c +++ b/src/adc/sid.c @@ -119,6 +119,7 @@ void sid_pool_destroy(struct sid_pool* pool) sid_t sid_alloc(struct sid_pool* pool, struct hub_user* user) { + sid_t n; if (pool->count >= (pool->max - pool->min)) { #ifdef DEBUG_SID @@ -127,7 +128,7 @@ sid_t sid_alloc(struct sid_pool* pool, struct hub_user* user) return 0; } - sid_t n = (++pool->count); + n = (++pool->count); for (; (pool->map[n % pool->max]); n++) ; #ifdef DEBUG_SID diff --git a/src/core/commands.c b/src/core/commands.c index 843db9f..5cdbfea 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -426,11 +426,12 @@ static int command_broadcast(struct hub_info* hub, struct hub_user* user, struct char from_sid[5]; char buffer[128]; size_t recipients = 0; + struct hub_user* target; memcpy(from_sid, sid_to_string(user->id.sid), sizeof(from_sid)); memcpy(pm_flag + 2, from_sid, sizeof(from_sid)); - struct hub_user* target = (struct hub_user*) list_get_first(hub->users->list); + target = (struct hub_user*) list_get_first(hub->users->list); while (target) { if (target != user)