all repos — cgit @ 94e5f212f55d3f4dd6ce83edb6db823de7eb8cc7

a hyperfast web frontend for git written in c

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>
John Keeping john@keeping.me.uk
Sun, 08 Mar 2015 16:32:24 +0000
commit

94e5f212f55d3f4dd6ce83edb6db823de7eb8cc7

parent

bd9fb0324d776aa5583a70a6125fce47697701b1

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M ui-shared.cui-shared.c

@@ -82,7 +82,7 @@ }

const char *cgit_loginurl(void) { - static const char *login_url = 0; + static const char *login_url; if (!login_url) login_url = fmtalloc("%s?p=login", cgit_rooturl()); return login_url;