diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2014-03-31 22:47:56 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-04-01 06:06:00 +0000 |
commit | e7b3eff7216de19efb74f7e8eb0c404c398d05e7 (patch) | |
tree | ddd4ad2e2e3880433350e7673dd6121f81db5ef8 /tshark.c | |
parent | 97cddf538c6438b1b995e742c3152b50be1d18d3 (diff) |
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>
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |