Alexander Barton : IRC_xLINE(): output an error message for unexpected " lines"
Module: ngircd.git Branch: master Commit: 8a8e8a3a23576ccdf06aec7d0a2e6a0d8584a9d8 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=8a8e8a3a2... Author: Alexander Barton <alex@barton.de> Date: Sun Dec 25 20:11:43 2011 +0100 IRC_xLINE(): output an error message for unexpected "lines" This fixes: irc-oper.c: In function ‘IRC_xLINE’: irc-oper.c:429: warning: ‘class’ may be used uninitialized in this function irc-oper.c:430: warning: ‘class_c’ may be used uninitialized in this function --- src/ngircd/irc-oper.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index 1b269e3..21577f0 100644 --- a/src/ngircd/irc-oper.c +++ b/src/ngircd/irc-oper.c @@ -450,6 +450,11 @@ IRC_xLINE(CLIENT *Client, REQUEST *Req) case 'K': class = CLASS_KLINE; class_c = 'K'; break; + default: + Log(LOG_CRIT, + "IRC_xLINE() called for unknown line: %c!? Ignored.", + Req->command[0]); + return CONNECTED; } if (Req->argc == 1) {
Teilnehmer (1)
-
alex@arthur.barton.de