git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] remove inline iteration variable

From
DRDavid Rientjes <rientjes@google.com>
Date
Aug 15, 2006, 17:23 UTC
Message-ID
<Pine.LNX.4.63.0608151022340.26891@chino.corp.google.com>
Remove unnecessary iteration variable in inline.
		David
Signed-off-by: David Rientjes <rientjes@google.com>
---
 builtin-grep.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin-grep.c b/builtin-grep.c
index 93b7e07..6476fe1 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -176,8 +176,8 @@ static void compile_regexp(struct grep_p
 #if DEBUG
 static inline void indent(int in)
 {
-	int i;
-	for (i = 0; i < in; i++) putchar(' ');
+	for (; in > 0; in--)
+		putchar(' ');
 }
 
 static void dump_pattern_exp(struct grep_expr *x, int in)
-- 
1.4.2.rc4.gf615-dirty
Next: Alex Riesen
Message 1 of 7 in “remove inline iteration variable”
  1. remove inline iteration variableDavid Rientjes, Aug 15, 2006
  2. Alex RiesenAug 16, 2006
  3. David RientjesAug 16, 2006
  4. Alex RiesenAug 16, 2006
  5. Junio C HamanoAug 16, 2006
  6. David RientjesAug 16, 2006
  7. Alex RiesenAug 17, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.