aboutsummaryrefslogtreecommitdiffstats
path: root/shared.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 /shared.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 'shared.c')
-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)
108 if (str == NULL) 108 if (str == NULL)
109 return NULL; 109 return NULL;
110 len = strlen(str); 110 len = strlen(str);
111 while(len > 0 && str[len - 1] == c) 111 while (len > 0 && str[len - 1] == c)
112 len--; 112 len--;
113 if (len == 0) 113 if (len == 0)
114 return NULL; 114 return NULL;
@@ -351,16 +351,16 @@ int cgit_parse_snapshots_mask(const char *str)
351 int tl, sl, rv = 0; 351 int tl, sl, rv = 0;
352 352
353 /* favor legacy setting */ 353 /* favor legacy setting */
354 if(atoi(str)) 354 if (atoi(str))
355 return 1; 355 return 1;
356 for(;;) { 356 for (;;) {
357 str += strspn(str, delim); 357 str += strspn(str, delim);
358 tl = strcspn(str, delim); 358 tl = strcspn(str, delim);
359 if (!tl) 359 if (!tl)
360 break; 360 break;
361 for (f = cgit_snapshot_formats; f->suffix; f++) { 361 for (f = cgit_snapshot_formats; f->suffix; f++) {
362 sl = strlen(f->suffix); 362 sl = strlen(f->suffix);
363 if((tl == sl && !strncmp(f->suffix, str, tl)) || 363 if ((tl == sl && !strncmp(f->suffix, str, tl)) ||
364 (tl == sl - 1 && !strncmp(f->suffix + 1, str, tl - 1))) { 364 (tl == sl - 1 && !strncmp(f->suffix + 1, str, tl - 1))) {
365 rv |= f->bit; 365 rv |= f->bit;
366 break; 366 break;