diff options
| author | Alexander Barton <alex@barton.de> | 2012-03-12 22:27:55 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2012-03-12 22:27:55 +0100 |
| commit | 0d9740b9fa1a432d35f73fafa7fb2ecd9a435502 (patch) | |
| tree | 826ea7d711f29225c33fe27e9b3345ad0e221f86 /src | |
| parent | e9be3334d1f0a40e44aac7754d828a4ce28a94b7 (diff) | |
| download | ngircd-0d9740b9fa1a432d35f73fafa7fb2ecd9a435502.tar.gz ngircd-0d9740b9fa1a432d35f73fafa7fb2ecd9a435502.zip | |
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)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/irc-mode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c index 80b29490..fa35cdd0 100644 --- a/src/ngircd/irc-mode.c +++ b/src/ngircd/irc-mode.c @@ -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); |