aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nano.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2018-03-14 21:14:47 +0100
committerAnders Broman <a.broman58@gmail.com>2018-03-14 21:51:35 +0000
commit710cf8121d502262609ef5fd69b1e4265a7a772b (patch)
tree6ea8d4573e4cdc9bbc650fdb229cb23348185ae9 /epan/dissectors/packet-nano.c
parent0ebcd273772ed1805a0d9f558827df152e392d30 (diff)
Nano: do not use packet scope strings in columns
Bug: 14533 Change-Id: I2fcab070ca0da5a594f62bd61bd09e42e4113852 Reviewed-on: https://code.wireshark.org/review/26477 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-nano.c')
-rw-r--r--epan/dissectors/packet-nano.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/epan/dissectors/packet-nano.c b/epan/dissectors/packet-nano.c
index 9692ef1104..2a069dd988 100644
--- a/epan/dissectors/packet-nano.c
+++ b/epan/dissectors/packet-nano.c
@@ -150,7 +150,7 @@ static int dissect_nano_keepalive(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
}
- col_set_str(pinfo->cinfo, COL_INFO, wmem_strdup_printf(wmem_packet_scope(), "Keepalive (%d peer%s)", peers, plurality(peers, "", "s")));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Keepalive (%d peer%s)", peers, plurality(peers, "", "s"));
return offset;
}
@@ -314,10 +314,9 @@ static int dissect_nano(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
// set the INFO header with more information
nano_block_type = (guint)((extensions >> 8) & 0xF);
- col_set_str(pinfo->cinfo, COL_INFO,
- wmem_strdup_printf(wmem_packet_scope(), "%s (%s)",
- val_to_str(nano_packet_type, VALS(nano_packet_type_strings), " "),
- val_to_str(nano_block_type, VALS(nano_block_type_strings), "Unknown (%d)")));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s (%s)",
+ val_to_str_const(nano_packet_type, VALS(nano_packet_type_strings), " "),
+ val_to_str(nano_block_type, VALS(nano_block_type_strings), "Unknown (%d)"));
// if it's a Confirm Ack packet, we first have a vote
if (nano_packet_type == NANO_PACKET_TYPE_CONFIRM_ACK) {
@@ -342,7 +341,7 @@ static int dissect_nano(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
break;
default:
- col_set_str(pinfo->cinfo, COL_INFO,
+ col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(nano_packet_type, VALS(nano_packet_type_strings), "Unknown (%d)"));
}