Fix gcc warning, initialize "list" variable to NULL

This fixes the following warning with gcc 4.6.3.:

  irc-mode.c: In function "Channel_Mode":
  irc-mode.c:947:26: error: "list" may be used uninitialized
                     in this function
  irc-mode.c:884:25: error: "list" may be used uninitialized
                     in this function

(The variable has never been used uninitialized, so don't worry)
This commit is contained in:
Alexander Barton 2012-03-12 22:27:55 +01:00
parent e9be3334d1
commit 0d9740b9fa
1 changed files with 2 additions and 2 deletions

View File

@ -856,7 +856,7 @@ Add_To_List(char what, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel,
const char *Pattern)
{
const char *mask;
struct list_head *list;
struct list_head *list = NULL;
long int current_count;
assert(Client != NULL);
@ -923,7 +923,7 @@ Del_From_List(char what, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel,
const char *Pattern)
{
const char *mask;
struct list_head *list;
struct list_head *list = NULL;
assert(Client != NULL);
assert(Channel != NULL);