about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2011-12-25 20:11:43 +0100
committerAlexander Barton <alex@barton.de>2011-12-25 20:11:43 +0100
commit8a8e8a3a23576ccdf06aec7d0a2e6a0d8584a9d8 (patch)
treeb01386321394d240dfa6723bc03aea3dbf692b06 /src
parent65befdafaa53843eacf5abf9c079cf8f0d2597b0 (diff)
downloadngircd-8a8e8a3a23576ccdf06aec7d0a2e6a0d8584a9d8.tar.gz
ngircd-8a8e8a3a23576ccdf06aec7d0a2e6a0d8584a9d8.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc-oper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c
index 1b269e3b..21577f00 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) {