aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-geonw.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-02-28 22:21:33 -0800
committerGuy Harris <gharris@sonic.net>2021-02-28 22:21:33 -0800
commite31bddb16f787dc441df2598cc229165dcccadaa (patch)
treeeb3faa69819e477831a842f7336aa2bd535e91dc /epan/dissectors/packet-geonw.c
parent73d793788ce631ac1c63bf2a0071d3d3e3351213 (diff)
geonw: fix the column formatting.
1) G_GUINT16_FORMAT produces warnings about mismatched format string formats and arguments if you use it with a 32-bit value. 2) There's no reason to format into a string buffer and then use col_append_lstr(); col_append_fstr() suffices. (In col_append_ports(), the formatting is done with col_snprint_port(), which attempts to resolve the port number to a name, but we don't do that here, we just format it as a number.)
Diffstat (limited to 'epan/dissectors/packet-geonw.c')
-rw-r--r--epan/dissectors/packet-geonw.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/dissectors/packet-geonw.c b/epan/dissectors/packet-geonw.c
index bd19f3dea6..f9e6189367 100644
--- a/epan/dissectors/packet-geonw.c
+++ b/epan/dissectors/packet-geonw.c
@@ -404,9 +404,7 @@ dissect_btpb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
pinfo->destport = dst_port;
- char buf_dst[32];
- snprintf(buf_dst, 32, "%"G_GUINT16_FORMAT, dst_port);
- col_append_lstr(pinfo->cinfo, COL_INFO, " " UTF8_RIGHTWARDS_ARROW " ", buf_dst, COL_ADD_LSTR_TERMINATOR);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " " UTF8_RIGHTWARDS_ARROW " %u", dst_port);
btpbh->btp_pdst = dst_port;
btpbh->btp_idst = dst_info;