Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Redundant Condition  at fe-help.c:39

Categories: LANG.STRUCT.RC CWE:570 CWE:571
Warning ID: 2244.2250
Procedure: commands_equal
Trace: View
Modified: Wed Sep 2 11:54:20 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/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 2244.2250 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: