From: Andreas Ericsson <ae@op5.se>
To: "H.Merijn Brand" <h.m.brand@xs4all.nl>
Cc: git@vger.kernel.org
Subject: Re: read_branches_file ()
Date: Mon, 11 Feb 2008 11:00:52 +0100 [thread overview]
Message-ID: <47B01CD4.4040004@op5.se> (raw)
In-Reply-To: <20080208170305.069d43d2@pc09.procura.nl>
H.Merijn Brand wrote:
> - if (!f)
> + if (stat (gp, &st_buf) || S_ISDIR (st_buf.st_mode))
Shouldn't this be
if (stat(gp, &st_buf) || !S_ISREG(st_buf.st_mode))
?
Otherwise, you might end up opening a FIFO, a socket or a
block/char special, which is obviously undesired.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
next prev parent reply other threads:[~2008-02-11 10:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 15:50 read_branches_file () H.Merijn Brand
2008-02-08 16:03 ` H.Merijn Brand
2008-02-08 16:22 ` Johannes Schindelin
2008-02-08 16:49 ` H.Merijn Brand
2008-02-11 10:00 ` Andreas Ericsson [this message]
2008-02-11 10:17 ` H.Merijn Brand
2008-02-08 17:18 ` Daniel Barkalow
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=47B01CD4.4040004@op5.se \
--to=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=h.m.brand@xs4all.nl \
/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).