diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2019-08-09 09:53:24 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2019-08-09 10:02:38 +0200 |
commit | f773b1c56122feaff9e9ecabbde3326b7c081233 (patch) | |
tree | 62974fbc45b16aee25cbeb09cf967be9d1f58608 /sf-pcap.c | |
parent | d6fd84ee114bf038587a860236176bdc7cf397a3 (diff) | |
download | libpcap-f773b1c56122feaff9e9ecabbde3326b7c081233.tar.gz |
Use %zu as the print format for size_t
C99 support it and also Visual Studio VS 2015 and after.
No more need for PRIsize format.
Diffstat (limited to 'sf-pcap.c')
-rw-r--r-- | sf-pcap.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -195,7 +195,7 @@ pcap_check_header(const uint8_t *magic, FILE *fp, u_int precision, char *errbuf, errno, "error reading dump file"); } else { pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, - "truncated dump file; tried to read %" PRIsize " file header bytes, only got %" PRIsize, + "truncated dump file; tried to read %zu file header bytes, only got %zu", sizeof(hdr), amt_read); } *err = 1; @@ -462,7 +462,7 @@ pcap_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data) } else { if (amt_read != 0) { pcap_snprintf(p->errbuf, PCAP_ERRBUF_SIZE, - "truncated dump file; tried to read %" PRIsize " header bytes, only got %" PRIsize, + "truncated dump file; tried to read %zu header bytes, only got %zu", ps->hdrsize, amt_read); return (-1); } @@ -622,7 +622,7 @@ pcap_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data) * the read finished. */ pcap_snprintf(p->errbuf, PCAP_ERRBUF_SIZE, - "truncated dump file; tried to read %u captured bytes, only got %" PRIsize, + "truncated dump file; tried to read %u captured bytes, only got %zu", p->snapshot, amt_read); } return (-1); @@ -646,7 +646,7 @@ pcap_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data) "error reading dump file"); } else { pcap_snprintf(p->errbuf, PCAP_ERRBUF_SIZE, - "truncated dump file; tried to read %u captured bytes, only got %" PRIsize, + "truncated dump file; tried to read %u captured bytes, only got %zu", hdr->caplen, bytes_read); } return (-1); @@ -698,7 +698,7 @@ pcap_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data) "error reading dump file"); } else { pcap_snprintf(p->errbuf, PCAP_ERRBUF_SIZE, - "truncated dump file; tried to read %u captured bytes, only got %" PRIsize, + "truncated dump file; tried to read %u captured bytes, only got %zu", hdr->caplen, amt_read); } return (-1); |