Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Redundant Condition  at completion.c:685

Categories: LANG.STRUCT.RC CWE:570 CWE:571
Warning ID: 7292.28380
Procedure: sig_complete_set
Trace: view
Modified: Thu Nov 26 11:09:12 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/completion.c
   Enter sig_complete_set
 675 static void sig_complete_set(GList **list, WINDOW_REC *window,
 676                              const char *word, const char *line, int *want_space) 
 677 {
 678         g_return_if_fail(list != NULL);
 679         g_return_if_fail(word != NULL);
 680         g_return_if_fail(line != NULL);
 681  
 682         if (*line == '\0' ||
 683             !strcmp("-clear", line) || !strcmp("-default", line))
 684                 *list = completion_get_settings(word, -1);
Always True: *line != 0685         else if (*line != '\0' && *word == '\0') {     /* Redundant Condition */
 686                 SETTINGS_REC *rec = settings_get_record(line);
 687                 if (rec != NULL) {
 688                         char *value = settings_get_print(rec);
 689                         if (value != NULL)
 690                                 *list = g_list_append(*list, value);
 691                 }
 692         }
 693  
 694         if (*list != NULL) signal_stop();
 695 } 




Change Warning 7292.28380 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: