1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-23 10:16:08 +02:00

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>
This commit is contained in:
Elia Pinto 2014-01-29 05:33:15 -08:00 committed by Junio C Hamano
parent e36f3a8a6f
commit ac39b27786

View File

@ -1581,14 +1581,14 @@ static const char *format_time(unsigned long time, const char *tz_str,
int show_raw_time)
{
static char time_buf[128];
const char *time_str;
int time_len;
int tz;
if (show_raw_time) {
snprintf(time_buf, sizeof(time_buf), "%lu %s", time, tz_str);
}
else {
const char *time_str;
int time_len;
int tz;
tz = atoi(tz_str);
time_str = show_date(time, tz, blame_date_mode);
time_len = strlen(time_str);