From 8d7ffcc99b02ffd0315e32ab26678fe6058f1289 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 17 Feb 2013 03:45:06 +0000 Subject: Add a macro that, for a given count of keys, returns the total size of an AirpcapKeysCollection structure with that number of keys, and use it instead of doing the calculation manually. svn path=/trunk/; revision=47699 --- ui/gtk/airpcap_gui_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/gtk/airpcap_gui_utils.c b/ui/gtk/airpcap_gui_utils.c index c33308cde5..fec1ad3594 100644 --- a/ui/gtk/airpcap_gui_utils.c +++ b/ui/gtk/airpcap_gui_utils.c @@ -715,7 +715,7 @@ airpcap_add_keys_to_driver_from_list(GtkListStore *key_list_store, airpcap_if_in /* * Calculate the size of the keys collection */ - KeysCollectionSize = (guint) (sizeof(AirpcapKeysCollection) + keys_in_list * sizeof(AirpcapKey)); + KeysCollectionSize = (guint)AirpcapKeysCollectionSize(keys_in_list); /* * Allocate the collection -- cgit v1.2.3