Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Redundant Condition  at fe-log.c:485

Categories: LANG.STRUCT.RC CWE:570 CWE:571
Warning ID: 7318.28410
Procedure: autolog_open_check
Trace: view
Modified: Thu Nov 26 11:09:29 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
   /kat0/fletcher/SATE/2010/irssi-0.8.14/src/fe-common/core/fe-log.c
   Enter autolog_open_check
 463 static void autolog_open_check(TEXT_DEST_REC *dest) 
 464 {
 465         const char *deftarget;
 466         SERVER_REC *server = dest->server;
 467         const char *server_tag = dest->server_tag;
 468         const char *target = dest->target;
 469         int level = dest->level;
 470  
 471         /* FIXME: kind of a kludge, but we don't want to reopen logs when 
 472            we're parting the channel with /WINDOW CLOSE.. Maybe a small 
 473            timeout would be nice instead of immediately closing the log file 
 474            after "window item destroyed" */ 
 475         if (level == MSGLEVEL_PARTS ||
 476             (autolog_level & level) == 0 || target == NULL || *target == '\0')
 477                 return;
 478  
 479         deftarget = server ? server->nick : "unknown";
 480  
 481         if (autolog_ignore_targets != NULL &&
 482             strarray_find_dest(autolog_ignore_targets, dest))
 483                 return;
 484  
Always True: target != (void*)0485         if (target != NULL)     /* Redundant Condition */  /* Null Test After Dereference (ID: 7317.28409) */
 486                 autolog_open(server, server_tag, strcmp(target, "*") ? target : deftarget);
 487 } 




Change Warning 7318.28410 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: