Module: ngircd.git Branch: master Commit: 6ef20e0f9a6c6f82fbb82b6c60f98b8e8b401b8d URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=6ef20...
Author: Alexander Barton alex@barton.de Date: Sun Dec 25 19:11:07 2011 +0100
Class_GetList() now retuns a pointer to list_head structure
---
src/ngircd/class.c | 4 ++-- src/ngircd/class.h | 2 +- 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 1a4d4c0..b7a5cbc 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 3507836..8c06c2e 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 736412f..1d91609 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,
ngircd-commits@lists.barton.de