aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-s7comm.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-s7comm.c
parentfe5248717faa1c99a4d0c761fa8da63afffc5d3f (diff)
Replace g_snprintf() with snprintf() (dissectors)
Use macros from inttypes.h with format strings.
Diffstat (limited to 'epan/dissectors/packet-s7comm.c')
-rw-r--r--epan/dissectors/packet-s7comm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-s7comm.c b/epan/dissectors/packet-s7comm.c
index 361cef714b..7ced92650a 100644
--- a/epan/dissectors/packet-s7comm.c
+++ b/epan/dissectors/packet-s7comm.c
@@ -2535,7 +2535,7 @@ s7comm_get_timestring_from_s7time(tvbuff_t *tvb, guint offset, char *str, gint m
mt = gmtime(&t);
str[0] = '\0';
if (mt != NULL) {
- g_snprintf(str, max, "%s %2d, %d %02d:%02d:%02d.%03d", mon_names[mt->tm_mon], mt->tm_mday,
+ snprintf(str, max, "%s %2d, %d %02d:%02d:%02d.%03d", mon_names[mt->tm_mon], mt->tm_mday,
mt->tm_year + 1900, mt->tm_hour, mt->tm_min, mt->tm_sec, day_msec % 1000);
}
}
@@ -6046,7 +6046,7 @@ s7comm_decode_ud_block_subfunc(tvbuff_t *tvb,
offset += 8;
proto_tree_add_item(data_tree, hf_s7comm_ud_blockinfo_headername, tvb, offset, 8, ENC_ASCII|ENC_NA);
offset += 8;
- g_snprintf(str_version, sizeof(str_version), "%d.%d", ((tvb_get_guint8(tvb, offset) & 0xf0) >> 4), tvb_get_guint8(tvb, offset) & 0x0f);
+ snprintf(str_version, sizeof(str_version), "%d.%d", ((tvb_get_guint8(tvb, offset) & 0xf0) >> 4), tvb_get_guint8(tvb, offset) & 0x0f);
proto_tree_add_string(data_tree, hf_s7comm_ud_blockinfo_headerversion, tvb, offset, 1, str_version);
offset += 1;
proto_tree_add_item(data_tree, hf_s7comm_ud_blockinfo_res_unknown, tvb, offset, 1, ENC_NA);
@@ -6310,7 +6310,7 @@ s7comm_decode_ud_data(tvbuff_t *tvb,
NULL, /* void *data */
len, /* fragment length - to the end */
more_frags); /* More fragments? */
- g_snprintf(str_fragadd, sizeof(str_fragadd), " id=%d", frag_id);
+ snprintf(str_fragadd, sizeof(str_fragadd), " id=%d", frag_id);
new_tvb = process_reassembled_data(tvb, offset, pinfo,
"Reassembled S7COMM", fd_head, &s7comm_frag_items,
NULL, tree);