diff options
author | João Valverde <j@v6e.pt> | 2021-11-05 05:59:41 +0000 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-11-06 11:45:21 +0000 |
commit | 2d45cb088138d3b043393bf0d04bb462a1d08771 (patch) | |
tree | fff6c8bc43c09ddc08be6693e7410398cc55066a /epan | |
parent | fb490eb17259ac19841fcb29570b1697f8cbfff8 (diff) |
dfilter: Improve some error messages
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dfilter/semcheck.c | 2 | ||||
-rw-r--r-- | epan/dfilter/sttype-string.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/epan/dfilter/semcheck.c b/epan/dfilter/semcheck.c index 89ddc9d65b..c0eeb976ab 100644 --- a/epan/dfilter/semcheck.c +++ b/epan/dfilter/semcheck.c @@ -1131,7 +1131,7 @@ check_relation_matches(dfwork_t *dfw, stnode_t *st_node, const char *patt; if (stnode_type_id(st_arg2) != STTYPE_STRING) { - dfilter_fail(dfw, "Expected a string not %s", stnode_todisplay(st_arg2)); + dfilter_fail(dfw, "Expected a double quoted string not %s", stnode_todisplay(st_arg2)); THROW(TypeError); } diff --git a/epan/dfilter/sttype-string.c b/epan/dfilter/sttype-string.c index 770d0765fb..794787432d 100644 --- a/epan/dfilter/sttype-string.c +++ b/epan/dfilter/sttype-string.c @@ -35,6 +35,12 @@ string_tostr(const void *data, gboolean pretty) return g_strdup(data); } +static char * +unparsed_tostr(const void *data, gboolean pretty _U_) +{ + return g_strdup(data); +} + void sttype_register_string(void) @@ -54,7 +60,7 @@ sttype_register_string(void) string_new, string_free, string_dup, - string_tostr + unparsed_tostr }; sttype_register(&string_type); |