On 1/30/24 02:44, Philippe Mathieu-Daudé wrote:
When a variable is initialized to &struct->field, use it in place. Rationale: while this makes the code more concise, this also helps static analyzers.Mechanical change using the following Coccinelle spatch script: @@ type S, F; identifier s, m, v; @@ S *s; ... F *v = &s->m; <+... - &s->m + v ...+> Inspired-by: Zhao Liu<[email protected]> Signed-off-by: Philippe Mathieu-Daudé<[email protected]> ---
Reviewed-by: Richard Henderson <[email protected]> r~
