diff options
author | Michael Mann <mmann78@netscape.net> | 2016-05-19 22:28:43 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-05-22 23:39:14 +0000 |
commit | 81d65ccec65c9bbe972fcb64933fc34d9679562c (patch) | |
tree | c84fcfbb3befcd535b470310a8d8cf48b63dfc1e /capinfos.c | |
parent | 6a992182ce47d721ce73eabf99983cea480dcf97 (diff) |
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 <anthony.coddington@endace.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'capinfos.c')
-rw-r--r-- | capinfos.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |