Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Redundant Condition  at pvmd.c:1345

Categories: LANG.STRUCT.RC CWE:570 CWE:571
Warning ID: 28.28611
Procedure: pkt_flags
Trace: view
Modified: Thu Nov 26 11:27:04 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/pvm3/src/pvmd.c
   Enter pkt_flags
 1331 char * 
 1332 pkt_flags(ff) 
 1333         int ff;
 1334 {
 1335         static char buf[64];
 1336         int bit, i;
 1337  
 1338         buf[0] = 0;
 1339         for (bit = 1, i = 0; i < sizeof(ffnames)/sizeof(ffnames[0]); i++, bit *= 2)
 1340                 if (ff & bit) {
 1341                         if (buf[0])
 1342                                 strcat(buf, ",");
 1343                         strcat(buf, ffnames[i]);
 1344                 }
Never True: buf[0] != 01345         if (!buf[0])     /* Redundant Condition */
 1346                 strcpy(buf, "0");
 1347         return buf;
 1348 } 




Change Warning 28.28611 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: