summaryrefslogtreecommitdiff
path: root/tshark.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-05-19 22:28:43 -0400
committerMichael Mann <mmann78@netscape.net>2016-05-22 23:39:14 +0000
commit81d65ccec65c9bbe972fcb64933fc34d9679562c (patch)
treec84fcfbb3befcd535b470310a8d8cf48b63dfc1e /tshark.c
parent6a992182ce47d721ce73eabf99983cea480dcf97 (diff)
downloadwireshark-81d65ccec65c9bbe972fcb64933fc34d9679562c.tar.gz
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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tshark.c b/tshark.c
index c4ade31a2b..dc28f8769e 100644
--- a/tshark.c
+++ b/tshark.c
@@ -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 &&