summaryrefslogtreecommitdiff
path: root/color_filters.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-10-16 20:02:14 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-10-16 20:02:14 +0000
commit26ad68d45ba377905e88de41fc45e65b3c6f40cf (patch)
tree574a7eaf6f09180a1bc0011c8ebca0a8b0284cba /color_filters.c
parentfe5529980670c1ca7664d83ffc12e63e77174020 (diff)
downloadwireshark-26ad68d45ba377905e88de41fc45e65b3c6f40cf.tar.gz
Prepend to lists rather than append as that's more efficient.
svn path=/trunk/; revision=52650
Diffstat (limited to 'color_filters.c')
-rw-r--r--color_filters.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/color_filters.c b/color_filters.c
index ae894363d3..7669c0e4e7 100644
--- a/color_filters.c
+++ b/color_filters.c
@@ -122,7 +122,7 @@ color_filters_add_tmp(GSList **cfl)
colorf = color_filter_new(name, NULL, &bg_color, &fg_color, TRUE);
colorf->filter_text = g_strdup("frame");
colorf->c_colorfilter = NULL;
- *cfl = g_slist_append(*cfl, colorf);
+ *cfl = g_slist_prepend(*cfl, colorf);
g_free(name);
}
@@ -269,7 +269,7 @@ color_filter_list_clone_cb(gpointer filter_arg, gpointer cfl_arg)
color_filter_t *new_colorf;
new_colorf = color_filter_clone((color_filter_t *)filter_arg);
- *cfl = g_slist_append(*cfl, new_colorf);
+ *cfl = g_slist_prepend(*cfl, new_colorf);
}
/* clone the specified list */
@@ -604,7 +604,7 @@ read_filters_file(FILE *f, gpointer user_data)
/* internal call */
colorf->c_colorfilter = temp_dfilter;
- *cfl = g_slist_append(*cfl, colorf);
+ *cfl = g_slist_prepend(*cfl, colorf);
} else {
/* external call */
/* just editing, don't need the compiled filter */