git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mitchell Blank Jr <mitch@sfgoth.com>
To: Jonas Fonseca <fonseca@diku.dk>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] dir: do all size checks before seeking back and fix file closing
Date: Sat, 26 Aug 2006 11:43:30 -0700	[thread overview]
Message-ID: <20060826184330.GA34439@gaz.sfgoth.com> (raw)
In-Reply-To: <20060826141709.GC11601@diku.dk>

Jonas Fonseca wrote:
>   err:
> -	if (0 <= fd)
> +	if (0 >= fd)
>  		close(fd);

Could you explain that piece?  You now only close "fd" if it's zero (stdin)
or negative (invalid).  The old code (close if its >=0) make more sense.

-Mitch

  reply	other threads:[~2006-08-26 18:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-26 14:17 [PATCH] dir: do all size checks before seeking back and fix file closing Jonas Fonseca
2006-08-26 18:43 ` Mitchell Blank Jr [this message]
2006-08-26 20:44   ` Jonas Fonseca
2006-08-26 22:13 ` Linus Torvalds
2006-08-26 22:35   ` Jakub Narebski
2006-08-27  0:07   ` Junio C Hamano
2006-08-27  2:15     ` Junio C Hamano
2006-08-27  2:37     ` Linus Torvalds
2006-08-27  3:04       ` Junio C Hamano
2006-08-27 23:55     ` [PATCH] Use fstat instead of fseek Jonas Fonseca

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=20060826184330.GA34439@gaz.sfgoth.com \
    --to=mitch@sfgoth.com \
    --cc=fonseca@diku.dk \
    --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 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).