mirror of
https://git.zx2c4.com/cgit
synced 2025-07-23 04:04:42 +02:00
ui-shared: return value of cgit_currenturl is not const
Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
37fce9916a
commit
c5c0eb873e
2 changed files with 3 additions and 3 deletions
|
@ -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] == '/')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue