summaryrefslogtreecommitdiff
path: root/plugins/irda/packet-irda.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-26 15:10:06 -0500
committerAnders Broman <a.broman58@gmail.com>2015-11-27 05:11:25 +0000
commit3606f80d9e297c2c1fd8e69b2d2a9e13a99d4344 (patch)
tree3aa83dd74b85ea84f6aea028a20e494dc674896f /plugins/irda/packet-irda.c
parent10261d120283cb739118fa7178b4e911ed72de14 (diff)
downloadwireshark-3606f80d9e297c2c1fd8e69b2d2a9e13a99d4344.tar.gz
Officially remove tvb_get_string and tvb_get_stringz.
Almost all replacements were done awhile ago, just put the final nail in the coffin. Change-Id: I0a708d886da5a500c2a1e2c9ee2736794bdb9411 Reviewed-on: https://code.wireshark.org/review/12206 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'plugins/irda/packet-irda.c')
-rw-r--r--plugins/irda/packet-irda.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/irda/packet-irda.c b/plugins/irda/packet-irda.c
index e1e1d9dae9..6430393b15 100644
--- a/plugins/irda/packet-irda.c
+++ b/plugins/irda/packet-irda.c
@@ -724,15 +724,14 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
case GET_VALUE_BY_CLASS:
if (retcode == 0)
{
- guint8 *string;
switch (tvb_get_guint8(tvb, offset + 6))
{
case IAS_MISSING:
- g_snprintf(buf, 300, ", Missing");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Missing");
break;
case IAS_INTEGER:
- g_snprintf(buf, 300, ", Integer: %d", tvb_get_ntohl(tvb, offset + 7));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Integer: %d", tvb_get_ntohl(tvb, offset + 7));
break;
case IAS_OCT_SEQ:
@@ -741,14 +740,11 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
case IAS_STRING:
n = tvb_get_guint8(tvb, offset + 8);
- string = tvb_get_string(wmem_packet_scope(), tvb, offset + 9, n);
- g_snprintf(buf, 300, ", \"%s\"", string);
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 9, n, ENC_ASCII));
break;
default:
- buf[0] = '\0';
break;
}
- col_append_str(pinfo->cinfo, COL_INFO, buf);
if (tvb_get_ntohs(tvb, offset + 2) > 1)
col_append_str(pinfo->cinfo, COL_INFO, ", ...");
}