diff options
author | Michael Tüxen <tuexen@fh-muenster.de> | 2011-10-13 20:13:52 +0000 |
---|---|---|
committer | Michael Tüxen <tuexen@fh-muenster.de> | 2011-10-13 20:13:52 +0000 |
commit | 59891bb9e4d3097ae6efd05281927577b457ec1f (patch) | |
tree | 897ac34555d1d199d7dafde7980ce50507c3e293 | |
parent | c20e6b8a25253650267fe347fd6fb7accd784214 (diff) | |
download | wireshark-59891bb9e4d3097ae6efd05281927577b457ec1f.tar.gz |
Use g_list_first() to find the first element in the list.
svn path=/trunk/; revision=39409
-rw-r--r-- | filters.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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); } } |