diff mbox

baum: Fix build with debugging enabled

Message ID 20150830151213.GE3238@var.home
State New
Headers show

Commit Message

Samuel Thibault Aug. 30, 2015, 3:12 p.m. UTC
cur and buf are pointers, so the difference is a ptrdiff_t

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Comments

Stefan Weil Aug. 30, 2015, 3:39 p.m. UTC | #1
Am 30.08.2015 um 17:12 schrieb Samuel Thibault:
> cur and buf are pointers, so the difference is a ptrdiff_t
>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
>
> diff --git a/backends/baum.c b/backends/baum.c
> index a69aaff..1f9288e 100644
> --- a/backends/baum.c
> +++ b/backends/baum.c
> @@ -303,7 +303,7 @@ static int baum_eat_packet(BaumDriverState *baum, const uint8_t *buf, int len)
>                  return 0;
>              cur++;
>          }
> -        DPRINTF("Dropped %d bytes!\n", cur - buf);
> +        DPRINTF("Dropped %td bytes!\n", cur - buf);
>      }
>  
>  #define EAT(c) do {\
>

Please don't send patches as reply to previous e-mails
and use a subject which shows the patch revision (here
"[PATCH v2] baum: Fix build with debugging enabled")
for future patches.

Reviewed-by: Stefan Weil <sw@weilnetz.de>
Michael Tokarev Sept. 6, 2015, 11:03 a.m. UTC | #2
30.08.2015 18:12, Samuel Thibault wrote:
> cur and buf are pointers, so the difference is a ptrdiff_t

Applied to -trivial, thanks!

/mjt
diff mbox

Patch

diff --git a/backends/baum.c b/backends/baum.c
index a69aaff..1f9288e 100644
--- a/backends/baum.c
+++ b/backends/baum.c
@@ -303,7 +303,7 @@  static int baum_eat_packet(BaumDriverState *baum, const uint8_t *buf, int len)
                 return 0;
             cur++;
         }
-        DPRINTF("Dropped %d bytes!\n", cur - buf);
+        DPRINTF("Dropped %td bytes!\n", cur - buf);
     }
 
 #define EAT(c) do {\