Text   |  XML   |  ReML   |   Visible Warnings:

Redundant Condition  at stats_tree.c:543

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

stats_tree_manip_node

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/stats_tree.c)expand/collapse
Show more  
 519  stats_tree_manip_node(manip_node_mode mode, stats_tree *st, const char *name,
 520                        int parent_id, gboolean with_hash, gint value)
 521  {
 522          stat_node *node = NULL;
 523          stat_node *parent = NULL;
 524           
 525          g_assert( parent_id >= 0 && parent_id < (int) st->parents->len );
 526           
 527          parent = g_ptr_array_index(st->parents,parent_id);
 528           
 529          if( parent->hash ) {
 530                  node = g_hash_table_lookup(parent->hash,name);
 531          } else {
 532                  node = g_hash_table_lookup(st->names,name);
 533          }
 534           
 535          if ( node == NULL )  
 536                  node = new_stat_node(st,name,parent_id,with_hash,with_hash);
 537           
 538          switch (mode) {
 539                  case MN_INCREASE: node->counter += value; break;
 540                  case MN_SET: node->counter = value; break;
 541          }
 542           
 543          if (node)  
 544                  return node->id;
 545          else 
 546                  return -1;
 547  }
Show more  




Change Warning 2641.29674 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: