aboutsummaryrefslogtreecommitdiffstats
path: root/filters.c
diff options
context:
space:
mode:
authortuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>2011-10-13 20:13:52 +0000
committertuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>2011-10-13 20:13:52 +0000
commit46cf23d75d56cd595b715c1faf6357638421e8d3 (patch)
tree897ac34555d1d199d7dafde7980ce50507c3e293 /filters.c
parent942e130ed64110462636b35f3704ff6f822f67df (diff)
Use g_list_first() to find the first element in the list.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39409 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'filters.c')
-rw-r--r--filters.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/filters.c b/filters.c
index 6ed7751dea..d2c63f7111 100644
--- a/filters.c
+++ b/filters.c
@@ -582,8 +582,6 @@ void copy_filter_list(filter_list_type_t dest_type, filter_list_type_t src_type)
flpp_dest = get_filter_list(dest_type);
flpp_src = get_filter_list(src_type);
- flp_src = *flpp_src;
-
/* throw away the "old" destination list - a NULL list is ok here */
while(*flpp_dest) {
*flpp_dest = remove_filter_entry(*flpp_dest, g_list_first(*flpp_dest));
@@ -591,11 +589,10 @@ void copy_filter_list(filter_list_type_t dest_type, filter_list_type_t src_type)
g_assert(g_list_length(*flpp_dest) == 0);
/* copy the list entries */
- while(flp_src) {
+ for(flp_src = g_list_first(*flpp_src); flp_src; flp_src = g_list_next(flp_src)) {
filt = (filter_def *)(flp_src->data);
*flpp_dest = add_filter_entry(*flpp_dest, filt->name, filt->strval);
- flp_src = g_list_next(flp_src);
}
}