aboutsummaryrefslogtreecommitdiffstats
path: root/ui-shared.c
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2014-10-05 11:59:03 +0200
committerLukas Fleischer <cgit@cryptocrack.de>2014-12-13 12:38:42 +0100
commit03f537f1a134c8578ae4c16055596539fbbcc220 (patch)
tree4c16fece25d645a7e52565d82833528d3c22d240 /ui-shared.c
parenteeddb5bc0905d4728001a111a9b1eb60ecccf9bd (diff)
downloadcgit-03f537f1a134c8578ae4c16055596539fbbcc220.tar.gz
cgit-03f537f1a134c8578ae4c16055596539fbbcc220.tar.xz
ui-shared: remove toggle_ssdiff arg to cgit_diff_link()
This argument is never used with a value other than zero, so remove it and simplify the code. Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 497dfd0..68e0d7c 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -385,7 +385,7 @@ void cgit_snapshot_link(const char *name, const char *title, const char *class,
void cgit_diff_link(const char *name, const char *title, const char *class,
const char *head, const char *new_rev, const char *old_rev,
- const char *path, int toggle_ssdiff)
+ const char *path)
{
char *delim;
@@ -402,7 +402,7 @@ void cgit_diff_link(const char *name, const char *title, const char *class,
html_url_arg(old_rev);
delim = "&amp;";
}
- if ((ctx.qry.ssdiff && !toggle_ssdiff) || (!ctx.qry.ssdiff && toggle_ssdiff)) {
+ if (ctx.qry.ssdiff) {
html(delim);
html("ss=1");
delim = "&amp;";
@@ -478,7 +478,7 @@ static void cgit_self_link(char *name, const char *title, const char *class)
else if (!strcmp(ctx.qry.page, "diff"))
cgit_diff_link(name, title, class, ctx.qry.head,
ctx.qry.sha1, ctx.qry.sha2,
- ctx.qry.path, 0);
+ ctx.qry.path);
else if (!strcmp(ctx.qry.page, "stats"))
cgit_stats_link(name, title, class, ctx.qry.head,
ctx.qry.path);
@@ -876,7 +876,7 @@ void cgit_print_pageheader(void)
cgit_commit_link("commit", NULL, hc("commit"),
ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath);
cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head,
- ctx.qry.sha1, ctx.qry.sha2, ctx.qry.vpath, 0);
+ ctx.qry.sha1, ctx.qry.sha2, ctx.qry.vpath);
if (ctx.repo->max_stats)
cgit_stats_link("stats", NULL, hc("stats"),
ctx.qry.head, ctx.qry.vpath);