From 6ef20e0f9a6c6f82fbb82b6c60f98b8e8b401b8d Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sun, 25 Dec 2011 19:11:07 +0100 Subject: [PATCH] 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 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, -- 2.40.0