diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2016-06-27 09:48:35 -0400 |
---|---|---|
committer | Jaap Keuter <jaap.keuter@xs4all.nl> | 2016-06-27 15:23:56 +0000 |
commit | d90e6e74da5e4766b95545120f259a5565071702 (patch) | |
tree | 30ffe602cb2c32c941267db77c9c873c65960cb4 | |
parent | 2ab415579491e4bc66ea58627bda504cae833b9e (diff) |
There's no need to check the return from g_array_index().
g_array_index() returns an index into an array: we're sure to find
something at that index (whether that something is in bounds is
a-whole-nother question).
This fixes CIDs 1362829 and 1362890/1362830. There were other CIDs like
this but they've already been fixed.
Change-Id: I94af0931b9adf3abd3bedc969e399cda98bbdd07
Reviewed-on: https://code.wireshark.org/review/16168
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
-rw-r--r-- | ui/qt/endpoint_dialog.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/ui/qt/endpoint_dialog.cpp b/ui/qt/endpoint_dialog.cpp index 3bcba47124..aa1541c877 100644 --- a/ui/qt/endpoint_dialog.cpp +++ b/ui/qt/endpoint_dialog.cpp @@ -272,10 +272,6 @@ public: #endif hostlist_talker_t *endp_item = &g_array_index(conv_array_, hostlist_talker_t, conv_idx_); - if (!endp_item) { - return QVariant(); - } - switch (col) { case ENDP_COLUMN_ADDR: { @@ -360,10 +356,6 @@ public: hostlist_talker_t *endp_item = &g_array_index(conv_array_, hostlist_talker_t, conv_idx_); hostlist_talker_t *other_item = &g_array_index(other_row->conv_array_, hostlist_talker_t, other_row->conv_idx_); - if (!endp_item || !other_item) { - return false; - } - int sort_col = treeWidget()->sortColumn(); switch(sort_col) { |