From e7ecc9b9e58398c202541ad12a0245235b0ae55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Mon, 8 Nov 2021 12:20:40 +0000 Subject: dfilter: Clean up error format and exception code Misc code cleanups. Add some extra stnode functions for increased type safety. Fix a constness issue with df_lval_value(). --- epan/dfilter/sttype-string.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'epan/dfilter/sttype-string.c') diff --git a/epan/dfilter/sttype-string.c b/epan/dfilter/sttype-string.c index 794787432d..dc99ad143e 100644 --- a/epan/dfilter/sttype-string.c +++ b/epan/dfilter/sttype-string.c @@ -9,12 +9,6 @@ #include "syntax-tree.h" -static gpointer -string_new(gpointer string) -{ - return g_strdup(string); -} - static gpointer string_dup(gconstpointer string) { @@ -48,7 +42,7 @@ sttype_register_string(void) static sttype_t string_type = { STTYPE_STRING, "STRING", - string_new, + NULL, string_free, string_dup, string_tostr @@ -57,7 +51,7 @@ sttype_register_string(void) static sttype_t unparsed_type = { STTYPE_UNPARSED, "UNPARSED", - string_new, + NULL, string_free, string_dup, unparsed_tostr -- cgit v1.2.3