Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-10-09 14:15:50 +0300
committerJason A. Donenfeld <Jason@zx2c4.com>2015-10-09 15:04:27 +0300
commitf77e2a8cfaf07b25ddedd57348a1d957b048bbf5 (patch)
tree3665e4bdb8f16401f43aeb309e9f8206ae2b2ded /ui-shared.c
parent6f2e4400faebd829f905c824400f933fe07f5c30 (diff)
ui-shared: return value of cgit_hosturl is not const
Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui-shared.c b/ui-shared.c
index f6d38de..09c34fd 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -54,14 +54,14 @@ const char *cgit_httpscheme(void)
return "http://";
}
-const char *cgit_hosturl(void)
+char *cgit_hosturl(void)
{
if (ctx.env.http_host)
- return ctx.env.http_host;
+ return xstrdup(ctx.env.http_host);
if (!ctx.env.server_name)
return NULL;
if (!ctx.env.server_port || atoi(ctx.env.server_port) == 80)
- return ctx.env.server_name;
+ return xstrdup(ctx.env.server_name);
return fmtalloc("%s:%s", ctx.env.server_name, ctx.env.server_port);
}