aboutsummaryrefslogtreecommitdiffstats
path: root/ui-ssdiff.c
diff options
context:
space:
mode:
authorJohn Keeping2016-08-07 16:14:49 +0100
committerJohn Keeping2016-10-01 11:43:45 +0100
commit7e67c64894b1093fbc009edd811fee1e76daa2d7 (patch)
tree5bfc570a1b1041d27b3b785453cc28d45f748969 /ui-ssdiff.c
parentbead27b730526e4501ebaeb3b7c1116cd09f7b93 (diff)
downloadcgit-7e67c64894b1093fbc009edd811fee1e76daa2d7.tar.gz
cgit-7e67c64894b1093fbc009edd811fee1e76daa2d7.tar.bz2
cgit-7e67c64894b1093fbc009edd811fee1e76daa2d7.zip
ui-ssdiff: fix decl-after-statement warnings
git.git's coding style avoids decl-after-statement and we generally try to follow it but a few warnings have crept in recently. Fix the one in ui-ssdiff.c Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'ui-ssdiff.c')
-rw-r--r--ui-ssdiff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-ssdiff.c b/ui-ssdiff.c
index 16c812f..7f261ed 100644
--- a/ui-ssdiff.c
+++ b/ui-ssdiff.c
@@ -92,7 +92,7 @@ static char *longest_common_subsequence(char *A, char *B)
92static int line_from_hunk(char *line, char type) 92static int line_from_hunk(char *line, char type)
93{ 93{
94 char *buf1, *buf2; 94 char *buf1, *buf2;
95 int len; 95 int len, res;
96 96
97 buf1 = strchr(line, type); 97 buf1 = strchr(line, type);
98 if (buf1 == NULL) 98 if (buf1 == NULL)
@@ -105,7 +105,7 @@ static int line_from_hunk(char *line, char type)
105 buf2 = xmalloc(len + 1); 105 buf2 = xmalloc(len + 1);
106 strncpy(buf2, buf1, len); 106 strncpy(buf2, buf1, len);
107 buf2[len] = '\0'; 107 buf2[len] = '\0';
108 int res = atoi(buf2); 108 res = atoi(buf2);
109 free(buf2); 109 free(buf2);
110 return res; 110 return res;
111} 111}