From c5c0eb873e0b9e40ffc3e85b621310ee85059ceb Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 9 Oct 2015 13:15:47 +0200 Subject: ui-shared: return value of cgit_currenturl is not const Signed-off-by: Christian Hesse --- ui-shared.c | 4 ++-- ui-shared.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui-shared.c b/ui-shared.c index d9f8258..b739675 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -65,10 +65,10 @@ const char *cgit_hosturl(void) return fmtalloc("%s:%s", ctx.env.server_name, ctx.env.server_port); } -const char *cgit_currenturl(void) +char *cgit_currenturl(void) { if (!ctx.qry.url) - return cgit_rooturl(); + return xstrdup(cgit_rooturl()); const char *root = cgit_rooturl(); size_t len = strlen(root); if (len && root[len - 1] == '/') diff --git a/ui-shared.h b/ui-shared.h index 246678b..4121416 100644 --- a/ui-shared.h +++ b/ui-shared.h @@ -4,7 +4,7 @@ extern const char *cgit_httpscheme(); extern const char *cgit_hosturl(); extern const char *cgit_rooturl(); -extern const char *cgit_currenturl(); +extern char *cgit_currenturl(); extern const char *cgit_loginurl(); extern char *cgit_repourl(const char *reponame); extern char *cgit_fileurl(const char *reponame, const char *pagename, -- cgit 1.4.1 p;follow=1'>log tree commit diff
Commit message (Expand)Author
2015-08-13tests: allow shell to be overriddenJohn Keeping
2015-08-13redirect: cleanlinessJason A. Donenfeld
2015-08-13redirect: be more careful for different cgi setupsJason A. Donenfeld
2015-08-12ui-log: fix double countingJohn Keeping
2015-08-12log: allow users to follow a fileJohn Keeping
2015-08-12shared: make cgit_diff_tree_cb publicJohn Keeping
2015-08-12t0110: Chain together using &&Jason A. Donenfeld
2015-08-12about: always ensure page has a trailing slashJason A. Donenfeld
2015-08-12filters: apply HTML escapingLazaros Koromilas
2015-08-12git: update to v2.5.0Christian Hesse
2015-08-12Fix processing of repo.hide and repo.ignoreDaniel Reichelt