IRC_xLINE(): output an error message for unexpected "lines" bug114-GKLine
authorAlexander Barton <alex@barton.de>
Sun, 25 Dec 2011 19:11:43 +0000 (20:11 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 25 Dec 2011 19:11:43 +0000 (20:11 +0100)
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

index 1b269e3be6a7f463c9549a0db33aa3b17097d7e5..21577f00438956992141cf6c255767763fcdd409 100644 (file)
@@ -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) {