Thread (16 messages) flat view 16 messages, 4 authors, 2016-06-15

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

From: Heiko Voigt <hidden>
Date: 2016-06-15 22:56:16

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:
quoted
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...
quoted
-	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?
That might be true. I will look into it. Just wanted to get rid of an
extra callback in my series.

Cheers Heiko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help