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 /wiretap/wtap.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 'wiretap/wtap.c')
-rw-r--r-- | wiretap/wtap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 30f4123fe0..bdc74adcbf 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -191,7 +191,7 @@ wtap_file_get_shb_for_new_file(wtap *wth) /* options */ wtap_optionblock_get_option_string(wth->shb_hdr, OPT_COMMENT, &opt_comment); - wtap_optionblock_set_option_string(shb_hdr, OPT_COMMENT, opt_comment); + wtap_optionblock_set_option_string(shb_hdr, OPT_COMMENT, opt_comment, (gsize)(opt_comment ? strlen(opt_comment) : 0)); return shb_hdr; } @@ -221,13 +221,13 @@ wtap_write_nrb_comment(wtap *wth, gchar *comment) wth->nrb_hdr = wtap_optionblock_create(WTAP_OPTION_BLOCK_NG_NRB); } - wtap_optionblock_set_option_string(wth->nrb_hdr, OPT_COMMENT, comment); + wtap_optionblock_set_option_string(wth->nrb_hdr, OPT_COMMENT, comment, (gsize)(comment ? strlen(comment) : 0)); } void wtap_write_shb_comment(wtap *wth, gchar *comment) { - wtap_optionblock_set_option_string(wth->shb_hdr, OPT_COMMENT, comment); + wtap_optionblock_set_option_string(wth->shb_hdr, OPT_COMMENT, comment, (gsize)(comment ? strlen(comment) : 0)); } wtapng_iface_descriptions_t * |