aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorThomas Glanzmann <sithglan@stud.uni-erlangen.de>2005-05-19 15:23:18 +0200
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-19 10:46:49 -0700
commit9669e17a2f79e8ef0bd5981f8178cada5e53d46b (patch)
treef9b4adc495026561f75745ecdcc3a6a1740388f1 /diff.c
parent5b486c3b6531755853e9700ceba0d01f1ed15d21 (diff)
downloadgit-9669e17a2f79e8ef0bd5981f8178cada5e53d46b.tar.gz
git-9669e17a2f79e8ef0bd5981f8178cada5e53d46b.tar.xz
[PATCH] Declare stacked variables before the first statement.
Signed-off-by: Thomas Glanzmann <sithglan@stud.uni-erlangen.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index c5ecc43fc..92fcc677e 100644
--- a/diff.c
+++ b/diff.c
@@ -95,7 +95,7 @@ static void builtin_diff(const char *name_a,
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];
@@ -112,7 +112,7 @@ static void builtin_diff(const char *name_a,
* 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);