batctl: Fix format string for raw tp_meter output
Commit Message
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>
---
tp_meter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Friday, May 20, 2016 17:30:08 Sven Eckelmann wrote:
> 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>
> ---
> tp_meter.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied in revision 53081ce.
Thanks,
Marek
@@ -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;