about summary refs log tree commit diff stats
path: root/ui-shared.c
diff options
context:
space:
mode:
authorJohn Keeping2014-10-05 10:59:03 +0100
committerLukas Fleischer2014-12-13 12:38:42 +0100
commit03f537f1a134c8578ae4c16055596539fbbcc220 (patch)
tree4c16fece25d645a7e52565d82833528d3c22d240 /ui-shared.c
parentui-shared: remove toggle_ssdiff arg to cgit_commit_link() (diff)
downloadcgit-03f537f1a134c8578ae4c16055596539fbbcc220.tar.gz
cgit-03f537f1a134c8578ae4c16055596539fbbcc220.zip
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,
385 385
386void cgit_diff_link(const char *name, const char *title, const char *class, 386void cgit_diff_link(const char *name, const char *title, const char *class,
387 const char *head, const char *new_rev, const char *old_rev, 387 const char *head, const char *new_rev, const char *old_rev,
388 const char *path, int toggle_ssdiff) 388 const char *path)
389{ 389{
390 char *delim; 390 char *delim;
391 391
@@ -402,7 +402,7 @@ void cgit_diff_link(const char *name, const char *title, const char *class,
402 html_url_arg(old_rev); 402 html_url_arg(old_rev);
403 delim = "&amp;"; 403 delim = "&amp;";
404 } 404 }
405 if ((ctx.qry.ssdiff && !toggle_ssdiff) || (!ctx.qry.ssdiff && toggle_ssdiff)) { 405 if (ctx.qry.ssdiff) {
406 html(delim); 406 html(delim);
407 html("ss=1"); 407 html("ss=1");
408 delim = "&amp;"; 408 delim = "&amp;";
@@ -478,7 +478,7 @@ static void cgit_self_link(char *name, const char *title, const char *class)
478 else if (!strcmp(ctx.qry.page, "diff")) 478 else if (!strcmp(ctx.qry.page, "diff"))
479 cgit_diff_link(name, title, class, ctx.qry.head, 479 cgit_diff_link(name, title, class, ctx.qry.head,
480 ctx.qry.sha1, ctx.qry.sha2, 480 ctx.qry.sha1, ctx.qry.sha2,
481 ctx.qry.path, 0); 481 ctx.qry.path);
482 else if (!strcmp(ctx.qry.page, "stats")) 482 else if (!strcmp(ctx.qry.page, "stats"))
483 cgit_stats_link(name, title, class, ctx.qry.head, 483 cgit_stats_link(name, title, class, ctx.qry.head,
484 ctx.qry.path); 484 ctx.qry.path);
@@ -876,7 +876,7 @@ void cgit_print_pageheader(void)
876 cgit_commit_link("commit", NULL, hc("commit"), 876 cgit_commit_link("commit", NULL, hc("commit"),
877 ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath); 877 ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath);
878 cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head, 878 cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head,
879 ctx.qry.sha1, ctx.qry.sha2, ctx.qry.vpath, 0); 879 ctx.qry.sha1, ctx.qry.sha2, ctx.qry.vpath);
880 if (ctx.repo->max_stats) 880 if (ctx.repo->max_stats)
881 cgit_stats_link("stats", NULL, hc("stats"), 881 cgit_stats_link("stats", NULL, hc("stats"),
882 ctx.qry.head, ctx.qry.vpath); 882 ctx.qry.head, ctx.qry.vpath);