Re: [PATCH 2/4] config: drop file pointer validity check in get_next_char()
- From
Jeff King <peff@peff.net>
- Date
- Feb 26, 2013, 20:05 UTC
- Message-ID
- <20130226200556.GB13830@sigill.intra.peff.net>
- In-Reply-To
- <20130226194023.GC22756@sandbox-ub>
On Tue, Feb 26, 2013 at 08:40:23PM +0100, Heiko Voigt wrote:
> The only location where cf is set in this file is in do_config_from(). > This function has only one callsite which is config_from_file(). In > config_from_file() its ensured that the f member is set to non-zero.
Makes sense, although...
> - if (cf && ((f = cf->f) != NULL)) {
> + if (cf) {
> + FILE *f = cf->f;Couldn't we say the same thing about "cf" here (i.e., that it would never be NULL)? Can we just get rid of this conditional entirely?
-Peff