From: Thomas Schwinge <tschwinge@gnu.org>
To: git@vger.kernel.org
Cc: Thomas Schwinge <tschwinge@gnu.org>
Subject: [PATCH] Don't rely on unspecified behavior
Date: Sat, 28 Jul 2007 18:39:39 +0200 [thread overview]
Message-ID: <11856407791617-git-send-email-tschwinge@gnu.org> (raw)
In-Reply-To: <11856407793933-git-send-email-tschwinge@gnu.org>
Calling access(p, m) with p == NULL is not specified, so don't do that. On
GNU/Hurd systems doing so will result in an SIGSEGV.
Signed-off-by: Thomas Schwinge <tschwinge@gnu.org>
---
builtin-add.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-add.c b/builtin-add.c
index 5e6748f..c13c738 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -74,7 +74,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))
add_excludes_from_file(dir, excludes_file);
/*
--
1.5.3.rc3.26.g6c58-dirty
next prev parent reply other threads:[~2007-07-28 16:39 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 ` Thomas Schwinge [this message]
2007-07-28 17:39 ` [PATCH] Don't rely on unspecified behavior Thomas Glanzmann
2007-07-28 18:25 ` Thomas Schwinge
2007-07-28 18:26 ` Thomas Schwinge
2007-07-28 19:30 ` Johannes Schindelin
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=11856407791617-git-send-email-tschwinge@gnu.org \
--to=tschwinge@gnu.org \
--cc=git@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.