diff options
| author | Alexander Barton <alex@barton.de> | 2011-12-25 19:11:07 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2011-12-25 19:11:07 +0100 |
| commit | 6ef20e0f9a6c6f82fbb82b6c60f98b8e8b401b8d (patch) | |
| tree | 349081b207cec959ce273080e137079ffb47d318 | |
| parent | e86e193e010b44bc567c0fb2dfbebd81b9735358 (diff) | |
| download | ngircd-6ef20e0f9a6c6f82fbb82b6c60f98b8e8b401b8d.tar.gz ngircd-6ef20e0f9a6c6f82fbb82b6c60f98b8e8b401b8d.zip | |
Class_GetList() now retuns a pointer to list_head structure
| -rw-r--r-- | src/ngircd/class.c | 4 | ||||
| -rw-r--r-- | src/ngircd/class.h | 2 | ||||
| -rw-r--r-- | src/ngircd/irc-info.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/ngircd/class.c b/src/ngircd/class.c index 1a4d4c0b..b7a5cbc0 100644 --- a/src/ngircd/class.c +++ b/src/ngircd/class.c @@ -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 diff --git a/src/ngircd/class.h b/src/ngircd/class.h index 3507836f..8c06c2e2 100644 --- a/src/ngircd/class.h +++ b/src/ngircd/class.h @@ -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)); diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c index 736412f1..1d91609a 100644 --- a/src/ngircd/irc-info.c +++ b/src/ngircd/irc-info.c @@ -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, |