Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] remove inline iteration variable

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:37

fork0@t-online.de (Alex Riesen) writes:
David Rientjes, Wed, Aug 16, 2006 19:14:44 +0200:
quoted
quoted
quoted
Remove unnecessary iteration variable in inline.
-       for (i = 0; i < in; i++) putchar(' ');
+       for (; in > 0; in--)
while(in--) putchar(' ');
That goes into an infinite loop if the argument is negative because
it emits a cmpl $0, x(%ebp).  Should never happen, but there's no
reason not to prevent it with a for loop.
while (in-- > 0) putchar(' ');

still shorter :)
Why do we keep talking about a usually ifdef'ed out debugging
section?

I'll be removing that section altogether ;-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help