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 /tshark.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 'tshark.c')
-rw-r--r-- | tshark.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -3272,9 +3272,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type, wtap_optionblock_get_option_string(shb_hdr, OPT_SHB_USERAPPL, &shb_user_appl); if (shb_user_appl == NULL) { /* this is free'd by wtap_optionblock_free() later */ - shb_user_appl = g_strdup_printf("TShark (Wireshark) %s", get_ws_vcs_version_info()); - wtap_optionblock_set_option_string(shb_hdr, OPT_SHB_USERAPPL, shb_user_appl); - g_free(shb_user_appl); + wtap_optionblock_set_option_string_format(shb_hdr, OPT_SHB_USERAPPL, "TShark (Wireshark) %s", get_ws_vcs_version_info()); } if (linktype != WTAP_ENCAP_PER_PACKET && |