diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Clean up the whole tree
Diffstat (limited to 'source/ui-summary.c')
-rw-r--r--source/ui-summary.c15
1 file changed, 5 insertions, 10 deletions
diff --git a/source/ui-summary.c b/source/ui-summary.c
index 197cd07..ea8f783 100644
--- a/source/ui-summary.c
+++ b/source/ui-summary.c
@@ -59,8 +59,7 @@ static int path_within(const char *base, const char *path)
{
size_t len = strlen(base);
- return starts_with(path, base) &&
- (path[len] == '\0' || path[len] == '/');
+ return starts_with(path, base) && (path[len] == '\0' || path[len] == '/');
}
/*
@@ -69,8 +68,7 @@ static int path_within(const char *base, const char *path)
* such a readme is confined to its own directory, so one named without a
* directory is refused.
*/
-static char *resolve_about_path(const char *filename, const char *ref,
- const char *path)
+static char *resolve_about_path(const char *filename, const char *ref, const char *path)
{
char *copy, *base_dir, *full_path;
char *resolved_base = NULL, *resolved_full = NULL;
@@ -91,8 +89,7 @@ static char *resolve_about_path(const char *filename, const char *ref,
if (!ref) {
resolved_base = realpath(base_dir, NULL);
resolved_full = realpath(full_path, NULL);
- if (!resolved_base || !resolved_full ||
- !path_within(resolved_base, resolved_full)) {
+ if (!resolved_base || !resolved_full || !path_within(resolved_base, resolved_full)) {
free(full_path);
full_path = NULL;
}
@@ -116,8 +113,7 @@ void cgit_print_summary(void)
cgit_print_tags(ctx.cfg.summary_tags);
if (ctx.cfg.summary_log > 0) {
htmlf("<tr class='nohover'><td colspan='%d'></td></tr>\n", columns);
- cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL,
- NULL, NULL, 0, 0, 0);
+ cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, NULL, NULL, 0, 0, 0);
}
clone_urls_printed = 0;
cgit_add_clone_urls(print_clone_url);
@@ -131,8 +127,7 @@ void cgit_print_repo_readme(const char *path)
int free_filename = 0;
mimetype = cgit_get_mimetype_for_filename(path);
- if (mimetype && (starts_with(mimetype, "image/") ||
- starts_with(mimetype, "video/"))) {
+ if (mimetype && (starts_with(mimetype, "image/") || starts_with(mimetype, "video/"))) {
ctx.page.mimetype = mimetype;
ctx.page.charset = NULL;
cgit_print_plain();