iface_lists: Access ifaces member by reference
authorMikael Kanstrup <mikael.kanstrup@gmail.com>
Fri, 25 Aug 2017 09:27:38 +0000 (11:27 +0200)
committerAnders Broman <a.broman58@gmail.com>
Mon, 28 Aug 2017 14:43:13 +0000 (14:43 +0000)
commit3b16cc8b219e087e6b8cc8898ed8e4d58263d326
tree17474bcfae8528356f475a42f1043fa022acfafb
parent81c48eacccbeb3466e607c0f708f38869da70491
iface_lists: Access ifaces member by reference

Change access of ifaces elements from by val to by reference.
With this change unnecessary copying of the whole struct is avoided
but even more important is that elements no longer have to be
removed and inserted whenever data is updated.

This change aims to make it more clear that ifaces elements shall
never directly be removed from the array. Instead use function
capture_opts_del_iface

NOTE: Code for GTK UI not updated

Ping-Bug: 13864
Change-Id: I04b65d5ee36526b30d959b8e5a2a48a3c7c4f15b
Reviewed-on: https://code.wireshark.org/review/23204
Reviewed-by: Anders Broman <a.broman58@gmail.com>
capchild/capture_sync.c
capture_opts.c
dumpcap.c
extcap.c
tshark.c
ui/capture.c
ui/capture_ui_utils.c
ui/iface_lists.c
ui/qt/interface_toolbar.cpp
ui/qt/main_window_slots.cpp
ui/qt/wireshark_application.cpp