Useless Assignment at tap-bootpstat.c:149 |
No properties have been set. edit properties |
Jump to warning location ↓ | warning details... |
| |
dhcpstat_init (/home/sate/Testcases/c/cve/wireshark-1.2.0/tap-bootpstat.c)![]() | ||||||
![]() | ||||||
140 | dhcpstat_init(const char *optarg, void* userdata _U_) | |||||
141 | { | |||||
142 | dhcpstat_t *sp; | |||||
143 | const char *filter=NULL; | |||||
144 | GString *error_string; | |||||
145 | ||||||
146 | if (!strncmp (optarg, "bootp,stat,", 11)){ | |||||
147 | filter=optarg+11; | |||||
148 | } else { | |||||
149 | filter=NULL;
| |||||
150 | } | |||||
151 | ||||||
152 | sp = g_malloc( sizeof(dhcpstat_t) ); | |||||
153 | sp->hash = g_hash_table_new( g_str_hash, g_str_equal); | |||||
154 | if(filter){ | |||||
155 | sp->filter=g_strdup(filter); | |||||
156 | } else { | |||||
157 | sp->filter=NULL; | |||||
158 | } | |||||
159 | sp->index = 0; /* Nothing to display yet */ | |||||
160 | ||||||
161 | error_string = register_tap_listener( | |||||
162 | "bootp", | |||||
163 | sp, | |||||
164 | filter, | |||||
165 | dhcpstat_reset, | |||||
166 | dhcpstat_packet, | |||||
167 | dhcpstat_draw); | |||||
168 | if (error_string){ | |||||
169 | /* error, we failed to attach to the tap. clean up */ | |||||
170 | g_free(sp->filter); | |||||
171 | g_free(sp); | |||||
172 | fprintf(stderr, "tshark: Couldn't register dhcp,stat tap: %s\n", | |||||
173 | error_string->str); | |||||
174 | g_string_free(error_string, TRUE); | |||||
175 | exit(1); | |||||
176 | } | |||||
177 | } | |||||
![]() |