diff options
author | João Valverde <j@v6e.pt> | 2021-12-17 20:05:19 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2021-12-19 20:25:11 +0000 |
commit | 22ee2764a7753c29133abebe83ba3c659f457b3d (patch) | |
tree | 3e75d8be1100d0f2f69687e02879a684cf48796f /epan/dissectors/packet-catapult-dct2000.c | |
parent | fe5248717faa1c99a4d0c761fa8da63afffc5d3f (diff) |
Replace g_snprintf() with snprintf() (dissectors)
Use macros from inttypes.h with format strings.
Diffstat (limited to 'epan/dissectors/packet-catapult-dct2000.c')
-rw-r--r-- | epan/dissectors/packet-catapult-dct2000.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c index 7d5a19227e..5989158fc2 100644 --- a/epan/dissectors/packet-catapult-dct2000.c +++ b/epan/dissectors/packet-catapult-dct2000.c @@ -2101,11 +2101,11 @@ static void dissect_tty_lines(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre int hex_string_length = 1+(2*tty_string_length)+1; hex_string = (char *)wmem_alloc(pinfo->pool, hex_string_length); - idx = g_snprintf(hex_string, hex_string_length, "$"); + idx = snprintf(hex_string, hex_string_length, "$"); /* Write hex out to new string */ for (n=0; n < tty_string_length; n++) { - idx += g_snprintf(hex_string+idx, 3, "%02x", + idx += snprintf(hex_string+idx, 3, "%02x", tvb_get_guint8(tvb, offset+n)); } string = hex_string; @@ -3181,7 +3181,7 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo if (protocol_handle == 0) { /* TODO: only look inside if a preference enabled? */ char dotted_protocol_name[128]; - /* N.B. avoiding g_snprintf(), which was slow */ + /* N.B. avoiding snprintf(), which was slow */ (void) g_strlcpy(dotted_protocol_name, "dct2000.", 128); (void) g_strlcpy(dotted_protocol_name+8, protocol_name, 128-8); protocol_handle = find_dissector(dotted_protocol_name); |