Re: [PATCH] seccomp: Remove unnecessary ‘NULL’ values from prepared

From: Kees Cook
Date: Thu Aug 24 2023 - 12:43:57 EST


On Sat, Aug 26, 2023 at 02:43:48AM +0800, Li zeming wrote:
> prepared is assigned first, so it does not need to initialize the
> assignment.

I prefer to explicitly initialize variables so that later changes in
the code cannot suddenly leave a variable in a surprise state. :) The
compiler will do a good job removing redundant and dead stores.

-Kees

--
Kees Cook