builtin/blame.c: reduce scope of variables
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elia Pinto committed
Jan 29, 2014 at 05:33 UTC
ac39b27786856c3d622d3ad2c1423ce1606ec7d4
1 file changed
+3
-3
builtin/blame.c
+3
-3
@@ -1581,14 +1581,14 @@ static const char *format_time(unsigned long time, const char *tz_str,
1581
int show_raw_time)
1582
{
1583
static char time_buf[128];
1584
- const char *time_str;
1585
- int time_len;
1586
- int tz;
1584
1585
if (show_raw_time) {
1586
snprintf(time_buf, sizeof(time_buf), "%lu %s", time, tz_str);
1587
}
1588
else {
1589
+ const char *time_str;
1590
+ int time_len;
1591
+ int tz;
1592
tz = atoi(tz_str);
1593
time_str = show_date(time, tz, blame_date_mode);
1594
time_len = strlen(time_str);