diff options
author | Jason A. Donenfeld | 2013-03-03 23:21:33 -0500 |
---|---|---|
committer | Jason A. Donenfeld | 2013-03-04 09:12:54 -0500 |
commit | bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e (patch) | |
tree | 683306f79bd96a45566879acd21e5ff085120acd /ui-shared.c | |
parent | 53bc747d311d18642fa3ad0cc0de34f3899ed1f4 (diff) | |
download | cgit-bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e.tar.gz cgit-bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e.tar.bz2 cgit-bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e.zip |
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.c | 12 |
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); |