Useless Assignment at tap-sipstat.c:395 |
No properties have been set. edit properties |
Jump to warning location ↓ | warning details... |
| |
sipstat_init (/home/sate/Testcases/c/cve/wireshark-1.2.0/tap-sipstat.c)![]() | ||||||
![]() | ||||||
386 | sipstat_init(const char *optarg, void* userdata _U_) | |||||
387 | { | |||||
388 | sipstat_t *sp; | |||||
389 | const char *filter=NULL; | |||||
390 | GString *error_string; | |||||
391 | ||||||
392 | if (strncmp (optarg, "sip,stat,", 9) == 0){ | |||||
393 | filter=optarg+9; | |||||
394 | } else { | |||||
395 | filter=NULL;
| |||||
396 | } | |||||
397 | ||||||
398 | sp = g_malloc( sizeof(sipstat_t) ); | |||||
399 | if(filter){ | |||||
400 | sp->filter=g_strdup(filter); | |||||
401 | } else { | |||||
402 | sp->filter=NULL; | |||||
403 | } | |||||
404 | /*g_hash_table_foreach( sip_status, (GHFunc)sip_reset_hash_responses, NULL);*/ | |||||
405 | ||||||
406 | ||||||
407 | error_string = register_tap_listener( | |||||
408 | "sip", | |||||
409 | sp, | |||||
410 | filter, | |||||
411 | sipstat_reset, | |||||
412 | sipstat_packet, | |||||
413 | sipstat_draw); | |||||
414 | if (error_string){ | |||||
415 | /* error, we failed to attach to the tap. clean up */ | |||||
416 | g_free(sp->filter); | |||||
417 | g_free(sp); | |||||
418 | fprintf (stderr, "tshark: Couldn't register sip,stat tap: %s\n", | |||||
419 | error_string->str); | |||||
420 | g_string_free(error_string, TRUE); | |||||
421 | exit(1); | |||||
422 | } | |||||
423 | ||||||
424 | sp->packets = 0; | |||||
425 | sp->resent_packets = 0; | |||||
426 | sip_init_hash(sp); | |||||
427 | } | |||||
![]() |