lkml.org 
[lkml]   [2022]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH bpf-next 2/5] x86/alternative: introduce text_poke_set
Date
On Sun, 2022-05-15 at 22:40 -0700, Song Liu wrote:
> +static void text_poke_memset(void *dst, const void *src, size_t len)
> +{
> + int c = *(int *)src;

It casts away the const unnecessarily. It could be *(const int *)src.

> +
> + memset(dst, c, len);
> +}
> +
\
 
 \ /
  Last update: 2022-05-17 21:17    [W:0.285 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site