]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/lists.c
Lists_CheckDupeMask(): return pointer to already existing item
[ngircd-alex.git] / src / ngircd / lists.c
index 63c16b0da1ed268af0a7f42bd6e49fe22a13da1a..11f8e888fec5292ff9b169c2fa9cd4954b2fc413 100644 (file)
@@ -240,17 +240,17 @@ Lists_Free(struct list_head *head)
  * @param Mask IRC mask to test.
  * @return true if mask is already stored in the list, false otherwise.
  */
-GLOBAL bool
+GLOBAL struct list_elem *
 Lists_CheckDupeMask(const struct list_head *h, const char *Mask )
 {
        struct list_elem *e;
        e = h->first;
        while (e) {
                if (strcasecmp(e->mask, Mask) == 0)
-                       return true;
+                       return e;
                e = e->next;
        }
-       return false;
+       return NULL;
 }
 
 /**