aboutsummaryrefslogtreecommitdiffstats
path: root/shared.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2013-03-03 23:21:33 -0500
committerJason A. Donenfeld <Jason@zx2c4.com>2013-03-04 09:12:54 -0500
commitbdae1d8a8d39206ac75ab86f8e9ef53b2f29432e (patch)
tree683306f79bd96a45566879acd21e5ff085120acd /shared.c
parent53bc747d311d18642fa3ad0cc0de34f3899ed1f4 (diff)
White space around control verbs.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--shared.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/shared.c b/shared.c
index 01800b6..e732064 100644
--- a/shared.c
+++ b/shared.c
@@ -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;