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

[PATCH] Declare stacked variables before the first statement.

From
TGThomas Glanzmann <sithglan@stud.uni-erlangen.de>
Date
May 19, 2005, 13:23 UTC
Message-ID
<20050519132318.GH12796@cip.informatik.uni-erlangen.de>
[PATCH] Declare stacked variables before the first statement.
Signed-off-by: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
--- a/diff.c
+++ b/diff.c
@@ -83,7 +83,7 @@
 			 const char *name_b,
 			 struct diff_tempfile *temp)
 {
-	int i, next_at;
+	int i, next_at, cmd_size;
 	const char *diff_cmd = "diff -L'%s%s' -L'%s%s'";
 	const char *diff_arg  = "'%s' '%s'||:"; /* "||:" is to return 0 */
 	const char *input_name_sq[2];
@@ -100,7 +100,7 @@
 	 * we use 2 spaces around diff-opts, and we need to count
 	 * terminating NUL, so we subtract 9 here.
 	 */
-	int cmd_size = (strlen(diff_cmd) + strlen(diff_opts) +
+	cmd_size = (strlen(diff_cmd) + strlen(diff_opts) +
 			strlen(diff_arg) - 9);
 	for (i = 0; i < 2; i++) {
 		input_name_sq[i] = sq_expand(temp[i].name);
Message 1 of 1 in “Declare stacked variables before the first statement.”
  1. Declare stacked variables before the first statement.Thomas Glanzmann, May 19, 2005

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.