Text   |  XML   |  ReML   |   Visible Warnings:

Redundant Condition  at proto_hier_stats.c:113

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

process_node

(/home/sate/Testcases/c/cve/wireshark-1.2.0/proto_hier_stats.c)expand/collapse
Show more  
 81  process_node(proto_node *ptree_node, GNode *parent_stat_node, ph_stats_t *ps, guint pkt_len)
 82  {
 83          field_info              *finfo;
 84          ph_stats_node_t         *stats;
 85          proto_node              *proto_sibling_node;
 86          GNode                   *stat_node;
 87   
 88          finfo = PITEM_FINFO(ptree_node);
 89          g_assert(finfo);
 90   
 91          /* If the field info isn't related to a protocol but to a field,
 92           * don't count them, as they don't belong to any protocol.
 93           * (happens e.g. for toplevel tree item of desegmentation "[Reassembled TCP Segments]") */
 94          if (finfo->hfinfo->parent != -1) {
 95                  /* Skip this element, use parent status node */
 96                  stat_node = parent_stat_node;
 97                  stats = STAT_NODE_STATS(stat_node);
 98          } else {
 99                  stat_node = find_stat_node(parent_stat_node, finfo->hfinfo);
 100   
 101                  stats = STAT_NODE_STATS(stat_node);
 102                  stats->num_pkts_total++;
 103                  stats->num_bytes_total += pkt_len;
 104          }
 105   
 106          proto_sibling_node = ptree_node->next;
 107   
 108          if (proto_sibling_node) {
 109                  /* If the name does not exist for this proto_sibling_node, then it is 
 110                   * not a normal protocol in the top-level tree.  It was instead
 111                   * added as a normal tree such as IPv6's Hop-by-hop Option Header and 
 112                   * should be skipped when creating the protocol hierarchy display. */
 113                  if(strlen(proto_sibling_node->finfo->hfinfo->name) == 0 && ptree_node->next)
 114                          proto_sibling_node = proto_sibling_node->next;
 115   
 116                  process_node(proto_sibling_node, stat_node, ps, pkt_len);
 117          } else {
 118                  stats->num_pkts_last++;
 119                  stats->num_bytes_last += pkt_len;
 120          }
 121  }
Show more  




Change Warning 4255.29652 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: