Text   |  XML   |  ReML   |   Visible Warnings:

Useless Assignment  at tap-httpstat.c:293

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

gtk_httpstat_init

(/home/sate/Testcases/c/cve/wireshark-1.2.0/tap-httpstat.c)expand/collapse
Show more  
 284  gtk_httpstat_init(const char *optarg,void* userdata _U_)
 285  {
 286          httpstat_t *sp;
 287          const char *filter=NULL;
 288          GString *error_string;
 289           
 290          if (!strncmp (optarg, "http,stat,", 10)){
 291                  filter=optarg+10;
 292          } else {
 293                  filter=NULL;
 294          }
 295           
 296          sp = g_malloc( sizeof(httpstat_t) );
 297          if(filter){
 298                  sp->filter=g_strdup(filter);
 299          } else {
 300                  sp->filter=NULL;
 301          }
 302          /*g_hash_table_foreach( http_status, (GHFunc)http_reset_hash_responses, NULL);*/
 303   
 304   
 305          error_string = register_tap_listener(  
 306                          "http",
 307                          sp,
 308                          filter,
 309                          httpstat_reset,
 310                          httpstat_packet,
 311                          httpstat_draw);
 312          if (error_string){
 313                  /* error, we failed to attach to the tap. clean up */
 314                  g_free(sp->filter);
 315                  g_free(sp);
 316                  fprintf (stderr, "tshark: Couldn't register http,stat tap: %s\n",
 317                                  error_string->str);
 318                  g_string_free(error_string, TRUE);
 319                  exit(1);
 320          }
 321   
 322          http_init_hash(sp);
 323  }
Show more  




Change Warning 4861.30898 : Useless Assignment

Priority:
State:
Finding:
Owner:
Note: