Minor compile fixes.
This commit is contained in:
parent
43375d8443
commit
4c94753469
|
@ -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 sid_alloc(struct sid_pool* pool, struct hub_user* user)
|
||||||
{
|
{
|
||||||
|
sid_t n;
|
||||||
if (pool->count >= (pool->max - pool->min))
|
if (pool->count >= (pool->max - pool->min))
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_SID
|
#ifdef DEBUG_SID
|
||||||
|
@ -127,7 +128,7 @@ sid_t sid_alloc(struct sid_pool* pool, struct hub_user* user)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sid_t n = (++pool->count);
|
n = (++pool->count);
|
||||||
for (; (pool->map[n % pool->max]); n++) ;
|
for (; (pool->map[n % pool->max]); n++) ;
|
||||||
|
|
||||||
#ifdef DEBUG_SID
|
#ifdef DEBUG_SID
|
||||||
|
|
|
@ -426,11 +426,12 @@ static int command_broadcast(struct hub_info* hub, struct hub_user* user, struct
|
||||||
char from_sid[5];
|
char from_sid[5];
|
||||||
char buffer[128];
|
char buffer[128];
|
||||||
size_t recipients = 0;
|
size_t recipients = 0;
|
||||||
|
struct hub_user* target;
|
||||||
|
|
||||||
memcpy(from_sid, sid_to_string(user->id.sid), sizeof(from_sid));
|
memcpy(from_sid, sid_to_string(user->id.sid), sizeof(from_sid));
|
||||||
memcpy(pm_flag + 2, from_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)
|
while (target)
|
||||||
{
|
{
|
||||||
if (target != user)
|
if (target != user)
|
||||||
|
|
Loading…
Reference in New Issue