Text   |  XML   |  ReML   |   Visible Warnings:

Useless Assignment  at tap-afpstat.c:126

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

afpstat_init

(/home/sate/Testcases/c/cve/wireshark-1.2.0/tap-afpstat.c)expand/collapse
Show more  
 116  afpstat_init(const char *optarg, void* userdata _U_)
 117  {
 118          afpstat_t *ss;
 119          guint32 i;
 120          const char *filter=NULL;
 121          GString *error_string;
 122   
 123          if(!strncmp(optarg,"afp,rtt,",8)){
 124                  filter=optarg+8;
 125          } else {
 126                  filter=NULL;
 127          }
 128   
 129          ss=g_malloc(sizeof(afpstat_t));
 130          if(filter){
 131                  ss->filter=g_strdup(filter);
 132          } else {
 133                  ss->filter=NULL;
 134          }
 135   
 136          for(i=0;i<256;i++){
 137                  ss->proc[i].num=0;
 138                  ss->proc[i].min_num=0;
 139                  ss->proc[i].max_num=0;
 140                  ss->proc[i].min.secs=0;
 141                  ss->proc[i].min.nsecs=0;
 142                  ss->proc[i].max.secs=0;
 143                  ss->proc[i].max.nsecs=0;
 144                  ss->proc[i].tot.secs=0;
 145                  ss->proc[i].tot.nsecs=0;
 146          }
 147   
 148          error_string=register_tap_listener("afp", ss, filter, NULL, afpstat_packet, afpstat_draw);
 149          if(error_string){
 150                  /* error, we failed to attach to the tap. clean up */
 151                  g_free(ss->filter);
 152                  g_free(ss);
 153   
 154                  fprintf(stderr, "tshark: Couldn't register afp,rtt tap: %s\n",
 155                      error_string->str);
 156                  g_string_free(error_string, TRUE);
 157                  exit(1);
 158          }
 159  }
Show more  




Change Warning 5054.30890 : Useless Assignment

Priority:
State:
Finding:
Owner:
Note: