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:
Hadriel Kaplan 2014-03-31 22:47:56 -04:00 committed by Anders Broman
parent 97cddf538c
commit e7b3eff721
1 changed files with 3 additions and 3 deletions

View File

@ -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