Re: [PATCH] Refactoring tracing code in "git.c" and "exec_cmd.c".

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Saturday, August 26, 2006 - 10:42 pm

Christian Couder <chriscool@tuxfamily.org> writes:


I really liked the fact (not necessarily the way, though) this
shortens the callers.


Wouldn't this be easier to read?

	if (count < 0)
        	for (count = 0; argv[count]; count++)
                	; /* just counting */



This confused me quite a bit.  Wouldn't it be simpler to special
case the count==0 case and return xcalloc(1,1) here (this would
allow you to lose "if (!count)" later as well)?


(style)
	if (i)
        	*to++ = ' ';



I do not think there is anything wrong with this function
per-se, but...


this feels wrong.  What happens when the original argv had
a per-cent in it?

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Refactoring tracing code in "git.c" and "exec_ ..., Junio C Hamano, (Sat Aug 26, 10:42 pm)