From bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e Mon Sep 17 00:00:00 2001 From: Jason A. Donenfeld Date: Sun, 3 Mar 2013 23:21:33 -0500 Subject: White space around control verbs. Signed-off-by: Jason A. Donenfeld --- ui-shared.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ui-shared.c') 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); -- cgit v1.2.3-70-g09d2