mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Use the z-option to printf %d for size_t printf. z is supported by the
libcurl *printf and by Linux printf(). This should make the code work nicely even for 64bit size_ts.
This commit is contained in:
parent
5eeaff8235
commit
87e7f4f688
@ -2427,11 +2427,11 @@ void dump(const char *text,
|
|||||||
/* without the hex output, we can fit more on screen */
|
/* without the hex output, we can fit more on screen */
|
||||||
width = 0x40;
|
width = 0x40;
|
||||||
|
|
||||||
fprintf(stream, "%s, %d bytes (0x%x)\n", text, size, size);
|
fprintf(stream, "%s, %zd bytes (0x%zx)\n", text, size, size);
|
||||||
|
|
||||||
for(i=0; i<size; i+= width) {
|
for(i=0; i<size; i+= width) {
|
||||||
|
|
||||||
fprintf(stream, "%04x: ", i);
|
fprintf(stream, "%04zx: ", i);
|
||||||
|
|
||||||
if(!nohex) {
|
if(!nohex) {
|
||||||
/* hex not disabled, show it */
|
/* hex not disabled, show it */
|
||||||
|
Loading…
Reference in New Issue
Block a user