From f2e511e14824cd66d67530ad37a0a8b250038f06 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 17 Mar 2019 14:23:34 -0700 Subject: [PATCH] No need for a per-instance private sctp_allassocs_info_t pointer. The result of sctp_stat_get_info() is only used in fillTable, so there's no need to save it. Make it a const pointer, to squelch warnings. Change-Id: Icb6fd7e2f5c3c5c53f7d33509d100a0947e69369 Reviewed-on: https://code.wireshark.org/review/32460 Petri-Dish: Guy Harris Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- ui/qt/sctp_all_assocs_dialog.cpp | 3 ++- ui/qt/sctp_all_assocs_dialog.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/qt/sctp_all_assocs_dialog.cpp b/ui/qt/sctp_all_assocs_dialog.cpp index 6f9646a909..1fff6824e8 100644 --- a/ui/qt/sctp_all_assocs_dialog.cpp +++ b/ui/qt/sctp_all_assocs_dialog.cpp @@ -43,6 +43,7 @@ SCTPAllAssocsDialog::~SCTPAllAssocsDialog() void SCTPAllAssocsDialog::fillTable() { + const sctp_allassocs_info_t *sctp_assocs; GList *list; const sctp_assoc_info_t* assinfo; int numAssocs; @@ -53,7 +54,7 @@ void SCTPAllAssocsDialog::fillTable() ui->assocList->setColumnWidth(3, 150); ui->assocList->setColumnWidth(4, 150); - sctp_assocs = (sctp_allassocs_info_t*)sctp_stat_get_info(); + sctp_assocs = sctp_stat_get_info(); if (sctp_assocs->is_registered == FALSE) { register_tap_listener_sctp_stat(); /* (redissect all packets) */ diff --git a/ui/qt/sctp_all_assocs_dialog.h b/ui/qt/sctp_all_assocs_dialog.h index 7c6a106910..1834a3adb2 100644 --- a/ui/qt/sctp_all_assocs_dialog.h +++ b/ui/qt/sctp_all_assocs_dialog.h @@ -48,7 +48,6 @@ private slots: private: Ui::SCTPAllAssocsDialog *ui; capture_file *cap_file_; - sctp_allassocs_info_t *sctp_assocs; guint16 selected_assoc_id;