public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Li zeming <zeming@nfschina.com>
Cc: luto@amacapital.net, wad@chromium.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] seccomp: Remove unnecessary ‘NULL’ values from prepared
Date: Thu, 24 Aug 2023 09:42:56 -0700	[thread overview]
Message-ID: <202308240941.E3CC7885E@keescook> (raw)
In-Reply-To: <20230825184348.6870-1-zeming@nfschina.com>

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

      reply	other threads:[~2023-08-24 16:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 18:43 [PATCH] seccomp: Remove unnecessary ‘NULL’ values from prepared Li zeming
2023-08-24 16:42 ` Kees Cook [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202308240941.E3CC7885E@keescook \
    --to=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=wad@chromium.org \
    --cc=zeming@nfschina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox