Commit 87e7f4f6 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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.
parent 5eeaff82
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2427,11 +2427,11 @@ void dump(const char *text,
    /* without the hex output, we can fit more on screen */
    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) {

    fprintf(stream, "%04x: ", i);
    fprintf(stream, "%04zx: ", i);

    if(!nohex) {
      /* hex not disabled, show it */