diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-03-03 23:21:33 -0500 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-03-04 09:12:54 -0500 |
commit | bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e (patch) | |
tree | 683306f79bd96a45566879acd21e5ff085120acd /shared.c | |
parent | 53bc747d311d18642fa3ad0cc0de34f3899ed1f4 (diff) | |
download | cgit-bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e.tar.gz cgit-bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e.tar.bz2 cgit-bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e.zip |
White space around control verbs.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'shared.c')
-rw-r--r-- | shared.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -108,7 +108,7 @@ char *trim_end(const char *str, char c) if (str == NULL) return NULL; len = strlen(str); - while(len > 0 && str[len - 1] == c) + while (len > 0 && str[len - 1] == c) len--; if (len == 0) return NULL; @@ -351,16 +351,16 @@ int cgit_parse_snapshots_mask(const char *str) int tl, sl, rv = 0; /* favor legacy setting */ - if(atoi(str)) + if (atoi(str)) return 1; - for(;;) { + for (;;) { str += strspn(str, delim); tl = strcspn(str, delim); if (!tl) break; for (f = cgit_snapshot_formats; f->suffix; f++) { sl = strlen(f->suffix); - if((tl == sl && !strncmp(f->suffix, str, tl)) || + if ((tl == sl && !strncmp(f->suffix, str, tl)) || (tl == sl - 1 && !strncmp(f->suffix + 1, str, tl - 1))) { rv |= f->bit; break; |