git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Glen Choo via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Taylor Blau <me@ttaylorr.com>,
	Derrick Stolee <derrickstolee@github.com>,
	Glen Choo <chooglen@google.com>
Subject: nonnull v.s. BUG() if !x (was: [PATCH v2] config.c: NULL check when reading protected config)
Date: Wed, 27 Jul 2022 11:12:22 +0200	[thread overview]
Message-ID: <220727.86v8rilxx1.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <pull.1299.v2.git.git.1658874067077.gitgitgadget@gmail.com>


On Tue, Jul 26 2022, Glen Choo via GitGitGadget wrote:

> From: Glen Choo <chooglen@google.com>

> +	if (!filename)
> +		BUG("filename cannot be NULL");

Looks good, but as an aside I wonder if we wouldn't get better code
analysis with "nonnull" for this sort of thing, but we can leave this
for now:
https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Common-Function-Attributes.html#Common-Function-Attributes

  reply	other threads:[~2022-07-27  9:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 17:09 [PATCH] config.c: NULL check when reading protected config Glen Choo via GitGitGadget
2022-07-26 17:27 ` Taylor Blau
2022-07-26 17:40   ` Glen Choo
2022-07-26 17:43     ` Taylor Blau
2022-07-26 17:51       ` Derrick Stolee
2022-07-26 19:42         ` Glen Choo
2022-07-26 19:03 ` Ævar Arnfjörð Bjarmason
2022-07-26 19:59   ` Glen Choo
2022-07-27  9:08     ` Ævar Arnfjörð Bjarmason
2022-07-26 22:21 ` [PATCH v2] " Glen Choo via GitGitGadget
2022-07-27  9:12   ` Ævar Arnfjörð Bjarmason [this message]
2022-07-27 17:07     ` nonnull v.s. BUG() if !x (was: [PATCH v2] config.c: NULL check when reading protected config) Glen Choo
2022-07-27 15:00   ` [PATCH v2] config.c: NULL check when reading protected config Junio C Hamano
2022-07-27 16:52     ` Glen Choo

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=220727.86v8rilxx1.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=chooglen@google.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=me@ttaylorr.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;
as well as URLs for NNTP newsgroup(s).