aboutsummaryrefslogtreecommitdiffstats
path: root/ui-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 /ui-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 'ui-shared.c')
-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)
103 int p; 103 int p;
104 const char *rv; 104 const char *rv;
105 strncpy(rvbuf, reponame, sizeof(rvbuf)); 105 strncpy(rvbuf, reponame, sizeof(rvbuf));
106 if(rvbuf[sizeof(rvbuf)-1]) 106 if (rvbuf[sizeof(rvbuf)-1])
107 die("cgit_repobasename: truncated repository name '%s'", reponame); 107 die("cgit_repobasename: truncated repository name '%s'", reponame);
108 p = strlen(rvbuf)-1; 108 p = strlen(rvbuf)-1;
109 /* strip trailing slashes */ 109 /* strip trailing slashes */
110 while(p && rvbuf[p] == '/') rvbuf[p--] = 0; 110 while (p && rvbuf[p] == '/') rvbuf[p--] = 0;
111 /* strip trailing .git */ 111 /* strip trailing .git */
112 if(p >= 3 && !strncmp(&rvbuf[p-3], ".git", 4)) { 112 if (p >= 3 && !strncmp(&rvbuf[p-3], ".git", 4)) {
113 p -= 3; rvbuf[p--] = 0; 113 p -= 3; rvbuf[p--] = 0;
114 } 114 }
115 /* strip more trailing slashes if any */ 115 /* strip more trailing slashes if any */
116 while( p && rvbuf[p] == '/') rvbuf[p--] = 0; 116 while ( p && rvbuf[p] == '/') rvbuf[p--] = 0;
117 /* find last slash in the remaining string */ 117 /* find last slash in the remaining string */
118 rv = strrchr(rvbuf,'/'); 118 rv = strrchr(rvbuf,'/');
119 if(rv) 119 if (rv)
120 return ++rv; 120 return ++rv;
121 return rvbuf; 121 return rvbuf;
122} 122}
@@ -576,7 +576,7 @@ void cgit_print_date(time_t secs, const char *format, int local_time)
576 576
577 if (!secs) 577 if (!secs)
578 return; 578 return;
579 if(local_time) 579 if (local_time)
580 time = localtime(&secs); 580 time = localtime(&secs);
581 else 581 else
582 time = gmtime(&secs); 582 time = gmtime(&secs);