From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Thomas Schwinge <tschwinge@gnu.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Don't rely on unspecified behavior
Date: Sat, 28 Jul 2007 20:30:07 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0707282028130.14781@racer.site> (raw)
In-Reply-To: <11856471952272-git-send-email-tschwinge@gnu.org>
Hi,
On Sat, 28 Jul 2007, Thomas Schwinge wrote:
> Calling access(p, m) with p == NULL is not specified, so don't do that. On
> GNU/Hurd systems doing so will result in a SIGSEGV.
>
> Signed-off-by: Thomas Schwinge <tschwinge@gnu.org>
> ---
Isn't this the same patch as you sent before?
> builtin-add.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/builtin-add.c b/builtin-add.c
> index 7345479..de5c108 100644
> --- a/builtin-add.c
> +++ b/builtin-add.c
> @@ -60,7 +60,7 @@ static void fill_directory(struct dir_struct *dir, const char **pathspec,
> path = git_path("info/exclude");
> if (!access(path, R_OK))
> add_excludes_from_file(dir, path);
> - if (!access(excludes_file, R_OK))
> + if (excludes_file != NULL && !access(excludes_file, R_OK))
We usually omit the "!= NULL"; see the other source code in git.git.
Ciao,
Dscho
next prev parent reply other threads:[~2007-07-28 19:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-28 16:39 [PATCH] Support building on GNU/Hurd Thomas Schwinge
2007-07-28 16:39 ` [PATCH] Don't rely on unspecified behavior Thomas Schwinge
2007-07-28 17:39 ` Thomas Glanzmann
2007-07-28 18:25 ` Thomas Schwinge
2007-07-28 18:26 ` Thomas Schwinge
2007-07-28 19:30 ` Johannes Schindelin [this message]
2007-07-28 19:34 ` Thomas Glanzmann
2007-07-28 20:16 ` Johannes Schindelin
2007-07-28 20:20 ` Thomas Glanzmann
2007-07-28 19:43 ` Thomas Schwinge
2007-07-28 20:17 ` Johannes Schindelin
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=Pine.LNX.4.64.0707282028130.14781@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=tschwinge@gnu.org \
/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).