mirror of
https://git.zx2c4.com/cgit
synced 2024-11-08 17:48:41 +00: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
@ -65,10 +65,10 @@ const char *cgit_hosturl(void)
|
|||||||
return fmtalloc("%s:%s", ctx.env.server_name, ctx.env.server_port);
|
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)
|
if (!ctx.qry.url)
|
||||||
return cgit_rooturl();
|
return xstrdup(cgit_rooturl());
|
||||||
const char *root = cgit_rooturl();
|
const char *root = cgit_rooturl();
|
||||||
size_t len = strlen(root);
|
size_t len = strlen(root);
|
||||||
if (len && root[len - 1] == '/')
|
if (len && root[len - 1] == '/')
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
extern const char *cgit_httpscheme();
|
extern const char *cgit_httpscheme();
|
||||||
extern const char *cgit_hosturl();
|
extern const char *cgit_hosturl();
|
||||||
extern const char *cgit_rooturl();
|
extern const char *cgit_rooturl();
|
||||||
extern const char *cgit_currenturl();
|
extern char *cgit_currenturl();
|
||||||
extern const char *cgit_loginurl();
|
extern const char *cgit_loginurl();
|
||||||
extern char *cgit_repourl(const char *reponame);
|
extern char *cgit_repourl(const char *reponame);
|
||||||
extern char *cgit_fileurl(const char *reponame, const char *pagename,
|
extern char *cgit_fileurl(const char *reponame, const char *pagename,
|
||||||
|
Loading…
Reference in New Issue
Block a user