Re: [PATCH] dir: do all size checks before seeking back and fix file closing
- From
Jonas Fonseca <fonseca@diku.dk>
- Date
- Aug 26, 2006, 20:44 UTC
- Message-ID
- <20060826204449.GA19104@diku.dk>
- In-Reply-To
- <20060826184330.GA34439@gaz.sfgoth.com>
Mitchell Blank Jr <mitch@sfgoth.com> wrote Sat, Aug 26, 2006:
Show 8 quoted lines
> 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.
Ah, yes, sorry for the noise. I read the old code as (fd <= 0).
-- Jonas Fonseca