aboutsummaryrefslogtreecommitdiffstats
path: root/ui-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 /ui-shared.c
parent53bc747d311d18642fa3ad0cc0de34f3899ed1f4 (diff)
White space around control verbs.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--ui-shared.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 1a28dce..af5310b 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -103,20 +103,20 @@ const char *cgit_repobasename(const char *reponame)
int p;
const char *rv;
strncpy(rvbuf, reponame, sizeof(rvbuf));
- if(rvbuf[sizeof(rvbuf)-1])
+ if (rvbuf[sizeof(rvbuf)-1])
die("cgit_repobasename: truncated repository name '%s'", reponame);
p = strlen(rvbuf)-1;
/* strip trailing slashes */
- while(p && rvbuf[p] == '/') rvbuf[p--] = 0;
+ while (p && rvbuf[p] == '/') rvbuf[p--] = 0;
/* strip trailing .git */
- if(p >= 3 && !strncmp(&rvbuf[p-3], ".git", 4)) {
+ if (p >= 3 && !strncmp(&rvbuf[p-3], ".git", 4)) {
p -= 3; rvbuf[p--] = 0;
}
/* strip more trailing slashes if any */
- while( p && rvbuf[p] == '/') rvbuf[p--] = 0;
+ while ( p && rvbuf[p] == '/') rvbuf[p--] = 0;
/* find last slash in the remaining string */
rv = strrchr(rvbuf,'/');
- if(rv)
+ if (rv)
return ++rv;
return rvbuf;
}
@@ -576,7 +576,7 @@ void cgit_print_date(time_t secs, const char *format, int local_time)
if (!secs)
return;
- if(local_time)
+ if (local_time)
time = localtime(&secs);
else
time = gmtime(&secs);