diff options
author | João Valverde <j@v6e.pt> | 2021-12-18 18:48:20 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2021-12-19 21:21:58 +0000 |
commit | 0ccd69e530ed18ac19a4484c76bdbef94d1ab2b1 (patch) | |
tree | ffb5f202b47fbead8ff87e573afd72c856c91ae0 /wiretap/nettl.c | |
parent | f984def50cfb20c5a47f7ac41b7b72bd270f2bb7 (diff) |
Replace g_strdup_printf() with ws_strdup_printf()
Use macros from inttypes.h.
Diffstat (limited to 'wiretap/nettl.c')
-rw-r--r-- | wiretap/nettl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/nettl.c b/wiretap/nettl.c index e9b43a82aa..e2b5a472c1 100644 --- a/wiretap/nettl.c +++ b/wiretap/nettl.c @@ -337,7 +337,7 @@ nettl_read_rec(wtap *wth, FILE_T fh, wtap_rec *rec, Buffer *buf, hdr_len = g_ntohs(rec_hdr.hdr_len); if (hdr_len < NETTL_REC_HDR_LEN) { *err = WTAP_ERR_BAD_FILE; - *err_info = g_strdup_printf("nettl: record header length %u too short", + *err_info = ws_strdup_printf("nettl: record header length %u too short", hdr_len); return FALSE; } @@ -537,7 +537,7 @@ nettl_read_rec(wtap *wth, FILE_T fh, wtap_rec *rec, Buffer *buf, if (length < padlen) { *err = WTAP_ERR_BAD_FILE; - *err_info = g_strdup_printf("nettl: packet length %u in record header too short, less than %u", + *err_info = ws_strdup_printf("nettl: packet length %u in record header too short, less than %u", length, padlen); return FALSE; } @@ -547,7 +547,7 @@ nettl_read_rec(wtap *wth, FILE_T fh, wtap_rec *rec, Buffer *buf, rec->rec_header.packet_header.len = length - padlen; if (caplen < padlen) { *err = WTAP_ERR_BAD_FILE; - *err_info = g_strdup_printf("nettl: captured length %u in record header too short, less than %u", + *err_info = ws_strdup_printf("nettl: captured length %u in record header too short, less than %u", caplen, padlen); return FALSE; } @@ -568,7 +568,7 @@ nettl_read_rec(wtap *wth, FILE_T fh, wtap_rec *rec, Buffer *buf, * to allocate space for an immensely-large packet. */ *err = WTAP_ERR_BAD_FILE; - *err_info = g_strdup_printf("nettl: File has %u-byte packet, bigger than maximum of %u", + *err_info = ws_strdup_printf("nettl: File has %u-byte packet, bigger than maximum of %u", rec->rec_header.packet_header.caplen, WTAP_MAX_PACKET_SIZE_STANDARD); return FALSE; } |