lkml.org 
[lkml]   [2022]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH bpf-next 07/11] samples: bpf: fix uin64_t format literals
On Thu, Apr 14, 2022 at 3:46 PM Alexander Lobakin <alobakin@pm.me> wrote:
>
> There's a couple places where uin64_t is being passed as an %ld
> format argument, which is incorrect (should be %lld). Fix them.

It depends on architecture, on some it will be %lu, on some it will be
%llu. But instead of PRIu64, just cast it to size_t and use %zu as
formatter

>
> Fixes: 51570a5ab2b7 ("A Sample of using socket cookie and uid for traffic monitoring")
> Fixes: 00f660eaf378 ("Sample program using SO_COOKIE")
> Signed-off-by: Alexander Lobakin <alobakin@pm.me>
> ---
> samples/bpf/cookie_uid_helper_example.c | 12 ++++++------
> samples/bpf/lwt_len_hist_user.c | 4 ++--
> 2 files changed, 8 insertions(+), 8 deletions(-)
>

[...]

\
 
 \ /
  Last update: 2022-04-20 19:15    [W:0.232 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site