Re: [PATCH] dir: do all size checks before seeking back and fix file closing
- From
- Mitchell Blank Jr <mitch@sfgoth.com>
- Date
- Aug 26, 2006, 18:43 UTC
- Message-ID
- <20060826184330.GA34439@gaz.sfgoth.com>
- 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