From 31d3a1b3d47c7efe0214b4f9114867e36f709c9a Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Tue, 8 Mar 2016 21:22:27 -0500 Subject: Initialize write function pointers when copying a new wtap block option. Issue found by Clang (Assigned value is garbage or undefined). Change-Id: I9a3ab41dd01becbd454af02f2567ea3a2beeba40 Reviewed-on: https://code.wireshark.org/review/14399 Reviewed-by: Alexis La Goutte --- wiretap/wtap_opttypes.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wiretap') diff --git a/wiretap/wtap_opttypes.c b/wiretap/wtap_opttypes.c index 3878178d9a..94ff7682fb 100644 --- a/wiretap/wtap_opttypes.c +++ b/wiretap/wtap_opttypes.c @@ -194,6 +194,8 @@ void wtap_optionblock_copy_options(wtap_optionblock_t dest_block, wtap_optionblo reg_optblock.name = src_internal->name; reg_optblock.description = src_internal->description; reg_optblock.type = src_internal->type; + reg_optblock.write_size_func = src_internal->write_size; + reg_optblock.write_func = src_internal->write_data; reg_optblock.option = src_value->option; reg_optblock.default_val = src_value->default_val; -- cgit v1.2.3