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:06:13 +0000 |
commit | fe5248717faa1c99a4d0c761fa8da63afffc5d3f (patch) | |
tree | 80dfeee421091a44c88f80b7a65edc0590e4b4e5 /wiretap/wtap.c | |
parent | c5a19582e4e18605e8528cd999221444f7ece318 (diff) |
Replace g_snprintf() with snprintf()
Use macros from inttypes.h with format strings.
Diffstat (limited to 'wiretap/wtap.c')
-rw-r--r-- | wiretap/wtap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 5d40b9c1ce..1547b5dfaf 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -353,7 +353,7 @@ wtap_get_debug_if_descr(const wtap_block_t if_descr, if (wtap_block_get_uint64_option_value(if_descr, OPT_IDB_SPEED, &tmp64) == WTAP_OPTTYPE_SUCCESS) { g_string_append_printf(info, - "%*cSpeed = %" G_GINT64_MODIFIER "u%s", indent, ' ', + "%*cSpeed = %" PRIu64 "%s", indent, ' ', tmp64, line_end); } @@ -377,7 +377,7 @@ wtap_get_debug_if_descr(const wtap_block_t if_descr, line_end); g_string_append_printf(info, - "%*cTime ticks per second = %" G_GINT64_MODIFIER "u%s", indent, ' ', + "%*cTime ticks per second = %" PRIu64 "%s", indent, ' ', if_descr_mand->time_units_per_second, line_end); @@ -1384,7 +1384,7 @@ wtap_strerror(int err) if (err < 0) { wtap_errlist_index = -1 - err; if (wtap_errlist_index >= WTAP_ERRLIST_SIZE) { - g_snprintf(errbuf, 128, "Error %d", err); + snprintf(errbuf, 128, "Error %d", err); return errbuf; } if (wtap_errlist[wtap_errlist_index] == NULL) @@ -1759,7 +1759,7 @@ wtap_full_file_read_file(wtap *wth, FILE_T fh, wtap_rec *rec, Buffer *buf, int * * Avoid allocating space for an immensely-large file. */ *err = WTAP_ERR_BAD_FILE; - *err_info = g_strdup_printf("%s: File has %" G_GINT64_MODIFIER "d-byte packet, bigger than maximum of %u", + *err_info = g_strdup_printf("%s: File has %" PRId64 "-byte packet, bigger than maximum of %u", wtap_encap_name(wth->file_encap), file_size, G_MAXINT); return FALSE; } |