aboutsummaryrefslogtreecommitdiffstats
path: root/ui/capture.c
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2024-01-13 07:38:26 -0500
committerAndersBroman <a.broman58@gmail.com>2024-01-15 09:23:34 +0000
commitb5c839815e3a2cb8d83ea2fb1a861301b4dc8848 (patch)
tree1147b65ee96f276532d443c8a86072933ca84bd7 /ui/capture.c
parenteeb818f5e758bf4abc78c0ce488291f6172e9417 (diff)
Remove duplicative members from interface_t
interface_t contains an if_info_t as its member. It doesn't need to copy the friendly name, vendor description, and type from the if_info_t into separate members. The vast majority of the time, we're already using the member from the embedded if_info_t, but change a couple of cases. The display name is a unique transformation of the name, friendly name (OS name), and vendor description (hardware name) that depends somewhat on the OS, so that needsto be seprate. The addresses and links are also transformed from the if_info format. The name is copied as well, but at least that's the primary key for the interface.
Diffstat (limited to 'ui/capture.c')
-rw-r--r--ui/capture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/capture.c b/ui/capture.c
index de3d200eb9..c31b5e0c09 100644
--- a/ui/capture.c
+++ b/ui/capture.c
@@ -902,7 +902,7 @@ capture_stat_start(capture_options *capture_opts)
/* Initialize the cache */
for (i = 0; i < capture_opts->all_ifaces->len; i++) {
device = &g_array_index(capture_opts->all_ifaces, interface_t, i);
- if (device->type != IF_PIPE && device->type != IF_EXTCAP) {
+ if (device->if_info.type != IF_PIPE && device->if_info.type != IF_EXTCAP) {
sc_item = g_new0(if_stat_cache_item_t, 1);
ws_assert(device->if_info.name);
sc_item->name = g_strdup(device->if_info.name);