aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2019-01-03 17:16:35 +0100
committerAnders Broman <a.broman58@gmail.com>2019-01-03 19:34:10 +0000
commit86ea0055f3543983ce4be85c8c423f335a16f801 (patch)
tree1b2ef76f223d2e07cad4925e1c489bdfeaa540fc
parentb44f07c8b323a5675181f1adb6d22640e3b33eb3 (diff)
tshark: remove redundant casts.
Found by clang-tidy. Change-Id: I7fe1c3219758d8daf411d094e2df17916f2eb57b Reviewed-on: https://code.wireshark.org/review/31330 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--tshark.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tshark.c b/tshark.c
index 2367f1aead..260d9cda8a 100644
--- a/tshark.c
+++ b/tshark.c
@@ -2573,7 +2573,7 @@ gboolean
capture_input_new_file(capture_session *cap_session, gchar *new_file)
{
capture_options *capture_opts = cap_session->capture_opts;
- capture_file *cf = (capture_file *) cap_session->cf;
+ capture_file *cf = cap_session->cf;
gboolean is_tempfile;
int err;
@@ -2612,9 +2612,9 @@ capture_input_new_file(capture_session *cap_session, gchar *new_file)
/* if we are in real-time mode, open the new file now */
if (do_dissection) {
/* this is probably unecessary, but better safe than sorry */
- ((capture_file *)cap_session->cf)->open_type = WTAP_TYPE_AUTO;
+ cap_session->cf->open_type = WTAP_TYPE_AUTO;
/* Attempt to open the capture file and set up to read from it. */
- switch(cf_open((capture_file *)cap_session->cf, capture_opts->save_file, WTAP_TYPE_AUTO, is_tempfile, &err)) {
+ switch(cf_open(cap_session->cf, capture_opts->save_file, WTAP_TYPE_AUTO, is_tempfile, &err)) {
case CF_OK:
break;
case CF_ERROR:
@@ -2640,7 +2640,7 @@ capture_input_new_packets(capture_session *cap_session, int to_read)
int err;
gchar *err_info;
gint64 data_offset;
- capture_file *cf = (capture_file *)cap_session->cf;
+ capture_file *cf = cap_session->cf;
gboolean filtering_tap_listeners;
guint tap_flags;
@@ -2807,7 +2807,7 @@ capture_input_drops(capture_session *cap_session _U_, guint32 dropped, char* int
void
capture_input_closed(capture_session *cap_session, gchar *msg)
{
- capture_file *cf = (capture_file *) cap_session->cf;
+ capture_file *cf = cap_session->cf;
if (msg != NULL)
fprintf(stderr, "tshark: %s\n", msg);