forked from osmocom/wireshark
Fix tshark.c to pass checkAPIs script
Since tshark.c was using strdup, perror, and g_main_quit, changes to the file won't pass checkAPIs; so this commit replaces those with the approved functions; except strdup, which was unecessary. Change-Id: I031aa44594f2b96960a45f48537ab4e9a10d34b1 Reviewed-on: https://code.wireshark.org/review/898 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
97cddf538c
commit
e7b3eff721
6
tshark.c
6
tshark.c
|
@ -1477,7 +1477,7 @@ main(int argc, char *argv[])
|
|||
/* already processed; just ignore it now */
|
||||
break;
|
||||
case 'S': /* Set the line Separator to be printed between packets */
|
||||
separator = strdup(optarg);
|
||||
separator = optarg;
|
||||
break;
|
||||
case 't': /* Time stamp type */
|
||||
if (strcmp(optarg, "r") == 0)
|
||||
|
@ -2515,7 +2515,7 @@ capture(void)
|
|||
|
||||
if (ret == -1)
|
||||
{
|
||||
perror("select()");
|
||||
fprintf(stderr, "%s: %s\n", "select()", g_strerror(errno));
|
||||
return TRUE;
|
||||
} else if (ret == 1) {
|
||||
#endif
|
||||
|
@ -2813,7 +2813,7 @@ capture_input_closed(capture_session *cap_session, gchar *msg)
|
|||
}
|
||||
#ifdef USE_BROKEN_G_MAIN_LOOP
|
||||
/*g_main_loop_quit(loop);*/
|
||||
g_main_quit(loop);
|
||||
g_main_loop_quit(loop);
|
||||
#else
|
||||
loop_running = FALSE;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue