mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 16:38:42 +00:00
ui-shared: avoid initializing static variable to zero
Sparse complains that we are using a plain integer as a NULL pointer here, but in fact we do not have to specify a value for this variable at all since it has static storage duration and thus will be initialized to NULL by the compiler. Signed-off-by: John Keeping <john@keeping.me.uk>
This commit is contained in:
parent
bd9fb0324d
commit
94e5f212f5
@ -82,7 +82,7 @@ const char *cgit_rooturl(void)
|
|||||||
|
|
||||||
const char *cgit_loginurl(void)
|
const char *cgit_loginurl(void)
|
||||||
{
|
{
|
||||||
static const char *login_url = 0;
|
static const char *login_url;
|
||||||
if (!login_url)
|
if (!login_url)
|
||||||
login_url = fmtalloc("%s?p=login", cgit_rooturl());
|
login_url = fmtalloc("%s?p=login", cgit_rooturl());
|
||||||
return login_url;
|
return login_url;
|
||||||
|
Loading…
Reference in New Issue
Block a user