From 81d65ccec65c9bbe972fcb64933fc34d9679562c Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Thu, 19 May 2016 22:28:43 -0400 Subject: Add wtap_optionblock_set_option_string_format Also add a length parameter to wtap_optionblock_set_option_string Change-Id: I8c7bbc48aa96b5c2a91ab9a17980928d6894f1ee Reviewed-on: https://code.wireshark.org/review/15505 Reviewed-by: Anthony Coddington Reviewed-by: Michael Mann --- capinfos.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'capinfos.c') diff --git a/capinfos.c b/capinfos.c index 96a7773e53..8accd470b7 100644 --- a/capinfos.c +++ b/capinfos.c @@ -1240,25 +1240,25 @@ process_cap_file(wtap *wth, const char *filename) wtap_optionblock_get_option_string(shb_inf, OPT_COMMENT, &shb_str); shb_str_no_newlines = g_strdup(shb_str); string_replace_newlines(shb_str_no_newlines); - wtap_optionblock_set_option_string(cf_info.shb, OPT_COMMENT, shb_str_no_newlines); + wtap_optionblock_set_option_string(cf_info.shb, OPT_COMMENT, shb_str_no_newlines, (gsize)(shb_str_no_newlines ? strlen(shb_str_no_newlines) : 0)); g_free(shb_str_no_newlines); wtap_optionblock_get_option_string(shb_inf, OPT_SHB_HARDWARE, &shb_str); shb_str_no_newlines = g_strdup(shb_str); string_replace_newlines(shb_str_no_newlines); - wtap_optionblock_set_option_string(cf_info.shb, OPT_SHB_HARDWARE, shb_str_no_newlines); + wtap_optionblock_set_option_string(cf_info.shb, OPT_SHB_HARDWARE, shb_str_no_newlines, (gsize)(shb_str_no_newlines ? strlen(shb_str_no_newlines) : 0)); g_free(shb_str_no_newlines); wtap_optionblock_get_option_string(shb_inf, OPT_SHB_OS, &shb_str); shb_str_no_newlines = g_strdup(shb_str); string_replace_newlines(shb_str_no_newlines); - wtap_optionblock_set_option_string(cf_info.shb, OPT_SHB_OS, shb_str_no_newlines); + wtap_optionblock_set_option_string(cf_info.shb, OPT_SHB_OS, shb_str_no_newlines, (gsize)(shb_str_no_newlines ? strlen(shb_str_no_newlines) : 0)); g_free(shb_str_no_newlines); wtap_optionblock_get_option_string(shb_inf, OPT_SHB_USERAPPL, &shb_str); shb_str_no_newlines = g_strdup(shb_str); string_replace_newlines(shb_str_no_newlines); - wtap_optionblock_set_option_string(cf_info.shb, OPT_SHB_USERAPPL, shb_str_no_newlines); + wtap_optionblock_set_option_string(cf_info.shb, OPT_SHB_USERAPPL, shb_str_no_newlines, (gsize)(shb_str_no_newlines ? strlen(shb_str_no_newlines) : 0)); g_free(shb_str_no_newlines); } -- cgit v1.2.1