Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

[PATCH 3/3] builtin/blame.c: reduce scope of variables

From: Elia Pinto <hidden>
Date: 2016-06-15 22:59:46
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Elia Pinto <redacted>
---
 builtin/blame.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin/blame.c b/builtin/blame.c
index e44a6bb..967a7c6 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1580,14 +1580,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);
-- 
1.7.10.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help