Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Redundant Condition  at fe-help.c:39

Categories: LANG.STRUCT.RC CWE:570 CWE:571
Warning ID: 7309.28401
Procedure: commands_equal
Trace: view
Modified: Thu Nov 26 11:09:23 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-help.c
   Enter commands_equal
 31 static int commands_equal(COMMAND_REC *rec, COMMAND_REC *rec2) 
 32 {
 33         int i;
 34  
 35         if (rec->category == NULL && rec2->category != NULL)
 36                 return -1;
 37         if (rec2->category == NULL && rec->category != NULL)
 38                 return 1;
Always True: rec2->category != (void*)039         if (rec->category != NULL && rec2->category != NULL) {     /* Redundant Condition */
 40                 i = strcmp(rec->category, rec2->category);
 41                 if (i != 0)
 42                         return i;
 43         }
 44  
 45         return strcmp(rec->cmd, rec2->cmd);
 46 } 




Change Warning 7309.28401 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: