threads / patch / 663

patchDeclare stacked variables before the first statement.

Subject: [PATCH] Declare stacked variables before the first statement.

## tl;dr

One message between May 19, 2005 and May 19, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Thomas Glanzmann· May 19, 2005, 13:23 UTC · lore
[PATCH] Declare stacked variables before the first statement.
Signed-off-by: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
Show changes to diff.c +2 −2
--- 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);

← back to recent threads