summaryrefslogtreecommitdiff
path: root/epan/dfilter/sttype-function.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 /epan/dfilter/sttype-function.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 'epan/dfilter/sttype-function.c')
-rw-r--r--epan/dfilter/sttype-function.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dfilter/sttype-function.c b/epan/dfilter/sttype-function.c
index f4c85e5c34..9c6587374e 100644
--- a/epan/dfilter/sttype-function.c
+++ b/epan/dfilter/sttype-function.c
@@ -60,8 +60,9 @@ function_dup(gconstpointer data)
for (p = org->params; p; p = p->next) {
const stnode_t *param = (const stnode_t *)p->data;
- stfuncrec->params = g_slist_append(stfuncrec->params, stnode_dup(param));
+ stfuncrec->params = g_slist_prepend(stfuncrec->params, stnode_dup(param));
}
+ stfuncrec->params = g_slist_reverse(stfuncrec->params);
return (gpointer) stfuncrec;
}