summaryrefslogtreecommitdiff
path: root/epan/ftypes/ftype-pcre.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2017-03-04 16:15:54 +0100
committerMartin Kaiser <wireshark@kaiser.cx>2017-03-07 21:55:22 +0000
commit25015a00a3d1f877f053940b59d5b96c1b80c744 (patch)
tree5074c791d1c1a1785522042c1d1efb0c26066660 /epan/ftypes/ftype-pcre.c
parent4caa64fc18dfbde99b6f8b0f5d2aa211292d9ffe (diff)
downloadwireshark-25015a00a3d1f877f053940b59d5b96c1b80c744.tar.gz
ftypes: create a set_value union
struct _ftype_t contains a number of pointers to set_value_...() functions. For each pre-defined ftype_t, only one of these pointers is != NULL. As the comment already says, we should move these functions into a union. ftenum_t ftype will be used for selecting the correct function pointer from the union. Create a set_value union and move the FvalueSetByteArrayFunc pointer into the union. Update fvalue_set_byte_array() accordingly. Check that the fvalue_t parameter is of the correct type. Change-Id: I6568d8f47108311289c0cd425f28ea8b38046141 Reviewed-on: https://code.wireshark.org/review/20433 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/ftypes/ftype-pcre.c')
-rw-r--r--epan/ftypes/ftype-pcre.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/ftypes/ftype-pcre.c b/epan/ftypes/ftype-pcre.c
index efde63ef9c..a479dcabb8 100644
--- a/epan/ftypes/ftype-pcre.c
+++ b/epan/ftypes/ftype-pcre.c
@@ -163,7 +163,8 @@ ftype_register_pcre(void)
gregex_to_repr, /* val_to_string_repr */
gregex_repr_len, /* len_string_repr */
- NULL, /* set_value_byte_array */
+ { NULL }, /* union set_value */
+
NULL, /* set_value_bytes */
NULL, /* set_value_guid */
NULL, /* set_value_time */