mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-31 17:49:11 +00:00
Class_GetList() now retuns a pointer to list_head structure
This commit is contained in:
parent
e86e193e01
commit
6ef20e0f9a
@ -75,12 +75,12 @@ Class_DeleteMask(const int Class, const char *Mask)
|
||||
Lists_Del(&My_Classes[Class], Mask);
|
||||
}
|
||||
|
||||
GLOBAL struct list_head
|
||||
GLOBAL struct list_head *
|
||||
Class_GetList(const int Class)
|
||||
{
|
||||
assert(Class < CLASS_COUNT);
|
||||
|
||||
return My_Classes[Class];
|
||||
return &My_Classes[Class];
|
||||
}
|
||||
|
||||
GLOBAL void
|
||||
|
@ -31,7 +31,7 @@ GLOBAL void Class_DeleteMask PARAMS((const int Class, const char *Mask));
|
||||
|
||||
GLOBAL bool Class_IsMember PARAMS((const int Class, CLIENT *Client));
|
||||
|
||||
GLOBAL struct list_head Class_GetList PARAMS((const int Class));
|
||||
GLOBAL struct list_head *Class_GetList PARAMS((const int Class));
|
||||
|
||||
GLOBAL void Class_Expire PARAMS((void));
|
||||
|
||||
|
@ -480,7 +480,7 @@ IRC_STATS( CLIENT *Client, REQUEST *Req )
|
||||
COMMAND *cmd;
|
||||
time_t time_now;
|
||||
unsigned int days, hrs, mins;
|
||||
struct list_head list;
|
||||
struct list_head *list;
|
||||
struct list_elem *list_item;
|
||||
|
||||
assert(Client != NULL);
|
||||
@ -531,7 +531,7 @@ IRC_STATS( CLIENT *Client, REQUEST *Req )
|
||||
list = Class_GetList(CLASS_GLINE);
|
||||
else
|
||||
list = Class_GetList(CLASS_KLINE);
|
||||
list_item = Lists_GetFirst(&list);
|
||||
list_item = Lists_GetFirst(list);
|
||||
while (list_item) {
|
||||
if (!IRC_WriteStrClient(from, RPL_STATSXLINE_MSG,
|
||||
Client_ID(from), query,
|
||||
|
Loading…
Reference in New Issue
Block a user