aboutsummaryrefslogtreecommitdiffstats
path: root/configfile.c
diff options
context:
space:
mode:
authorGravatar Jason A. Donenfeld <Jason@zx2c4.com>2013-03-04 13:21:33 (JST)
committerGravatar Jason A. Donenfeld <Jason@zx2c4.com>2013-03-04 23:12:54 (JST)
commitbdae1d8a8d39206ac75ab86f8e9ef53b2f29432e (patch)
tree683306f79bd96a45566879acd21e5ff085120acd /configfile.c
parent53bc747d311d18642fa3ad0cc0de34f3899ed1f4 (diff)
downloadcgit-bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e.zip
cgit-bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e.tar.gz
White space around control verbs.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'configfile.c')
-rw-r--r--configfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/configfile.c b/configfile.c
index fe5f9c5..3fa217f 100644
--- a/configfile.c
+++ b/configfile.c
@@ -27,7 +27,7 @@ void skip_line(FILE *f)
27{ 27{
28 int c; 28 int c;
29 29
30 while((c = next_char(f)) && c != '\n' && c != EOF) 30 while ((c = next_char(f)) && c != '\n' && c != EOF)
31 ; 31 ;
32} 32}
33 33
@@ -36,7 +36,7 @@ int read_config_line(FILE *f, char *line, const char **value, int bufsize)
36 int i = 0, isname = 0; 36 int i = 0, isname = 0;
37 37
38 *value = NULL; 38 *value = NULL;
39 while(i < bufsize - 1) { 39 while (i < bufsize - 1) {
40 int c = next_char(f); 40 int c = next_char(f);
41 if (!isname && (c == '#' || c == ';')) { 41 if (!isname && (c == '#' || c == ';')) {
42 skip_line(f); 42 skip_line(f);
@@ -78,7 +78,7 @@ int parse_configfile(const char *filename, configfile_value_fn fn)
78 if (!(f = fopen(filename, "r"))) 78 if (!(f = fopen(filename, "r")))
79 return -1; 79 return -1;
80 nesting++; 80 nesting++;
81 while((len = read_config_line(f, line, &value, sizeof(line))) > 0) 81 while ((len = read_config_line(f, line, &value, sizeof(line))) > 0)
82 fn(line, value); 82 fn(line, value);
83 nesting--; 83 nesting--;
84 fclose(f); 84 fclose(f);