Re: [PATCH 2/4] config: drop file pointer validity check in get_next_char()

2013-02-27 Thread Heiko Voigt
On Wed, Feb 27, 2013 at 08:52:57AM +0100, Heiko Voigt wrote: On Tue, Feb 26, 2013 at 03:05:56PM -0500, Jeff King wrote: 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

Re: [PATCH 2/4] config: drop file pointer validity check in get_next_char()

2013-02-27 Thread Heiko Voigt
On Thu, Feb 28, 2013 at 01:41:47AM +0100, Heiko Voigt wrote: On Wed, Feb 27, 2013 at 08:52:57AM +0100, Heiko Voigt wrote: On Tue, Feb 26, 2013 at 03:05:56PM -0500, Jeff King wrote: On Tue, Feb 26, 2013 at 08:40:23PM +0100, Heiko Voigt wrote: The only location where cf is set in this

[PATCH 2/4] config: drop file pointer validity check in get_next_char()

2013-02-26 Thread Heiko Voigt
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. Signed-off-by: Heiko Voigt hvo...@hvoigt.net --- config.c | 4 ++-- 1 file changed, 2

Re: [PATCH 2/4] config: drop file pointer validity check in get_next_char()

2013-02-26 Thread Jeff King
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...

Re: [PATCH 2/4] config: drop file pointer validity check in get_next_char()

2013-02-26 Thread Heiko Voigt
On Tue, Feb 26, 2013 at 03:05:56PM -0500, Jeff King wrote: 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