diff options
author | John Keeping | 2015-03-08 16:32:24 +0000 |
---|---|---|
committer | Jason A. Donenfeld | 2015-03-09 17:40:24 +0100 |
commit | 94e5f212f55d3f4dd6ce83edb6db823de7eb8cc7 (patch) | |
tree | d2888a5dd5cdaae7a32131d8acd4cf78b91e85a1 /ui-shared.c | |
parent | bd9fb0324d776aa5583a70a6125fce47697701b1 (diff) | |
download | cgit-94e5f212f55d3f4dd6ce83edb6db823de7eb8cc7.tar.gz cgit-94e5f212f55d3f4dd6ce83edb6db823de7eb8cc7.tar.bz2 cgit-94e5f212f55d3f4dd6ce83edb6db823de7eb8cc7.zip |
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>
Diffstat (limited to 'ui-shared.c')
-rw-r--r-- | ui-shared.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-shared.c b/ui-shared.c index d4c4bb9..1e3c131 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -82,7 +82,7 @@ const char *cgit_rooturl(void) | |||
82 | 82 | ||
83 | const char *cgit_loginurl(void) | 83 | const char *cgit_loginurl(void) |
84 | { | 84 | { |
85 | static const char *login_url = 0; | 85 | static const char *login_url; |
86 | if (!login_url) | 86 | if (!login_url) |
87 | login_url = fmtalloc("%s?p=login", cgit_rooturl()); | 87 | login_url = fmtalloc("%s?p=login", cgit_rooturl()); |
88 | return login_url; | 88 | return login_url; |