aboutsummaryrefslogtreecommitdiffstats
path: root/epan/filter_expressions.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-10-28 14:41:59 -0700
committerGerald Combs <gerald@wireshark.org>2015-10-29 19:00:34 +0000
commitf449dcd8a590416aa33e5314f3db2bfc00134e9c (patch)
treee573122e7046692099942111d50a751cc5078798 /epan/filter_expressions.c
parentbd4f414593f2d463f4e36427da335923f141e264 (diff)
Qt: Add the ability to add filter expressions.
Add a "+" icon to the display filter toolbar which allows the addition of a new filter expression button. (Hopefully this will be the last main window UI change before 2.0.) Change-Id: I52bf56bf699dddb7b387b9f4de1bf8b35eb3c4ce Reviewed-on: https://code.wireshark.org/review/11375 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan/filter_expressions.c')
-rw-r--r--epan/filter_expressions.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/epan/filter_expressions.c b/epan/filter_expressions.c
index 936fca96c7..1b6d3069e6 100644
--- a/epan/filter_expressions.c
+++ b/epan/filter_expressions.c
@@ -44,16 +44,10 @@ filter_expression_new(const gchar *label, const gchar *expr,
struct filter_expression *expression;
struct filter_expression *prev;
- expression = (struct filter_expression *)g_malloc(sizeof(struct filter_expression));
- memset(expression, '\0', sizeof(struct filter_expression));
- expression->button = NULL;
+ expression = (struct filter_expression *)g_malloc0(sizeof(struct filter_expression));
expression->label = g_strdup(label);
expression->expression = g_strdup(expr);
expression->enabled = enabled;
- expression->deleted = FALSE;
- expression->index = 0;
-
- expression->next = NULL;
/* Add it at the end so the button order is always the same*/
if (*pfilter_expression_head == NULL) {