]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Class_GetList() now retuns a pointer to list_head structure
authorAlexander Barton <alex@barton.de>
Sun, 25 Dec 2011 18:11:07 +0000 (19:11 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 25 Dec 2011 18:11:07 +0000 (19:11 +0100)
src/ngircd/class.c
src/ngircd/class.h
src/ngircd/irc-info.c

index 1a4d4c0b6d1179ae22776d8f57df80c2754d71d8..b7a5cbc04a2fa1389fb39e2dfd5b806c44a5598f 100644 (file)
@@ -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
index 3507836f857f0c7ce261e440f80ab0ed9396f623..8c06c2e2dde562b84f18703933574bd364ed471b 100644 (file)
@@ -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));
 
index 736412f1fcdde91459540de1b51df995b2003e70..1d91609a7118c43fb3c43e665634b4dcdcacb33e 100644 (file)
@@ -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,