[Cake] [PATCH 1/2] cake: print_uint format fixes

Toke Høiland-Jørgensen toke at toke.dk
Sun Mar 11 16:49:55 EDT 2018


Thank you for the patch! :)

> Signed-off-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
> ---
>  tc/q_cake.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/tc/q_cake.c b/tc/q_cake.c
> index 44cadb63..f888bd2a 100644
> --- a/tc/q_cake.c
> +++ b/tc/q_cake.c
> @@ -47,6 +47,7 @@
>  #include <netinet/in.h>
>  #include <arpa/inet.h>
>  #include <string.h>
> +#include <inttypes.h>
>  
>  #include "utils.h"
>  #include "tc_util.h"
> @@ -557,10 +558,10 @@ static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
>  	else if (!raw)
>  		print_string(PRINT_ANY, "atm", "%s ", "noatm");
>  
> -	print_uint(PRINT_ANY, "overhead", "overhead %d ", overhead);
> +	print_uint(PRINT_ANY, "overhead", "overhead %" PRId64 " ",
> overhead);

Guess this should actually be print_int(), since overhead can be
negative?

-Toke


More information about the Cake mailing list