Repository : ssh://git@open-mesh.org/batctl
On branch : next
commit 53081cebda475f434b5383a5fc6c24be0ba9577b Author: Sven Eckelmann sven@narfation.org Date: Fri May 20 17:30:08 2016 +0200
batctl: Fix format string for raw tp_meter output
The tp_meter output for raw bytes is not casting the values to float. It must therefore use PRIu64 to print the results.
Reported-by: Simon Wunderlich sw@simonwunderlich.de Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
53081cebda475f434b5383a5fc6c24be0ba9577b tp_meter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tp_meter.c b/tp_meter.c index d980ebd..43c19da 100644 --- a/tp_meter.c +++ b/tp_meter.c @@ -524,8 +524,8 @@ int tp_meter(char *mesh_iface, int argc, char **argv) (float)throughput / (1<<10), (float)throughput * 8 / 1000); else - printf("%lu Bytes/s (%lu Bps)\n", - throughput, throughput * 8); + printf("%" PRIu64 " Bytes/s (%" PRIu64 " Bps)\n", + throughput, throughput * 8);
ret = 0; break;