Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Redundant Condition  at flood.c:254

Categories: LANG.STRUCT.RC CWE:570 CWE:571
Warning ID: 2212.2218
Procedure: flood_privmsg
Trace: View
Modified: Wed Sep 2 11:52:42 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
ProblemLineSource
   /u1/paul/SATE/2010/c/irssi/irssi-0.8.14/src/irc/flood/flood.c
   Enter flood_privmsg
 239 static void flood_privmsg(IRC_SERVER_REC *server, const char *data,
 240                           const char *nick, const char *addr) 
 241 {
 242         char *params, *target, *text;
 243         int level;
 244  
 245         g_return_if_fail(data != NULL);
 246         g_return_if_fail(server != NULL);
 247  
 248         if (addr == NULL || g_strcasecmp(nick, server->nick) == 0)
 249                 return;
 250  
 251         params = event_get_params(data, 2, &target, &text);
 252  
 253         level = ischannel(*target) ? MSGLEVEL_PUBLIC : MSGLEVEL_MSGS;
Always True: addr != (void*)0254         if (addr != NULL && !ignore_check(SERVER(server), nick, addr, target, text, level))     /* Redundant Condition */
 255                 flood_newmsg(server, level, nick, addr, target);
 256  
 257         g_free(params);
 258 




Change Warning 2212.2218 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: