Commit 616c1433b89d143a41035495a0a8504a19a72532

Russell Belfer 2012-08-12T11:53:58

Clean up code Okay, this is probably cleaner and it is also less net change from the original version

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/config_file.c b/src/config_file.c
index 4334235..547509b 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -1343,9 +1343,8 @@ static int parse_variable(diskfile_backend *cfg, char **var_name, char **var_val
 	else
 		value_start = var_end + 1;
 
-	var_end--;
-	while (git__isspace(*var_end))
-		var_end--;
+	do var_end--;
+	while (git__isspace(*var_end));
 
 	*var_name = git__strndup(line, var_end - line + 1);
 	GITERR_CHECK_ALLOC(*var_name);