aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ositp.c
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2021-12-17 20:05:19 +0000
committerJoão Valverde <j@v6e.pt>2021-12-19 20:25:11 +0000
commit22ee2764a7753c29133abebe83ba3c659f457b3d (patch)
tree3e75d8be1100d0f2f69687e02879a684cf48796f /epan/dissectors/packet-ositp.c
parentfe5248717faa1c99a4d0c761fa8da63afffc5d3f (diff)
Replace g_snprintf() with snprintf() (dissectors)
Use macros from inttypes.h with format strings.
Diffstat (limited to 'epan/dissectors/packet-ositp.c')
-rw-r--r--epan/dissectors/packet-ositp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ositp.c b/epan/dissectors/packet-ositp.c
index 60ea3c7047..915dbbce4b 100644
--- a/epan/dissectors/packet-ositp.c
+++ b/epan/dissectors/packet-ositp.c
@@ -383,20 +383,20 @@ static gchar *print_tsap(tvbuff_t *tvb, int offset, int length)
cur=(gchar *)wmem_alloc(wmem_packet_scope(), MAX_TSAP_LEN * 2 + 3);
cur[0] = '\0';
if (length <= 0 || length > MAX_TSAP_LEN)
- g_snprintf(cur, MAX_TSAP_LEN * 2 + 3, "<unsupported TSAP length>");
+ snprintf(cur, MAX_TSAP_LEN * 2 + 3, "<unsupported TSAP length>");
else {
allprintable = tvb_ascii_isprint(tvb, offset, length);
if (!allprintable) {
- returned_length = g_snprintf(cur, MAX_TSAP_LEN * 2 + 3, "0x");
+ returned_length = snprintf(cur, MAX_TSAP_LEN * 2 + 3, "0x");
idx += MIN(returned_length, MAX_TSAP_LEN * 2 + 3 - 1);
}
while (length != 0) {
if (allprintable) {
- returned_length = g_snprintf(&cur[idx], MAX_TSAP_LEN * 2 + 3 - idx,
+ returned_length = snprintf(&cur[idx], MAX_TSAP_LEN * 2 + 3 - idx,
"%c", *tsap ++);
idx += MIN(returned_length, MAX_TSAP_LEN * 2 + 3 - idx - 1);
} else {
- returned_length = g_snprintf(&cur[idx], MAX_TSAP_LEN * 2 + 3 - idx,
+ returned_length = snprintf(&cur[idx], MAX_TSAP_LEN * 2 + 3 - idx,
"%02x", *tsap ++);
idx += MIN(returned_length, MAX_TSAP_LEN * 2 + 3 - idx - 1);
}