summaryrefslogtreecommitdiff
path: root/builtin/config.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2012-10-28 21:05:25 (GMT)
committerJeff King <peff@peff.net>2012-10-29 05:48:06 (GMT)
commit5ba1a8a735c721cc66cc030866163f6fdb7f5ecb (patch)
treefa455c3dabb07ddd38d50ee4450ff055382ff4aa /builtin/config.c
parente89558988305c3e912c0674faeb814e44563f7fd (diff)
downloadgit-5ba1a8a735c721cc66cc030866163f6fdb7f5ecb.zip
git-5ba1a8a735c721cc66cc030866163f6fdb7f5ecb.tar.gz
git-5ba1a8a735c721cc66cc030866163f6fdb7f5ecb.tar.bz2
builtin/config.c: Fix a sparse warning
Sparse issues an "Using plain integer as NULL pointer" warning while checking a 'struct strbuf_list' initializer expression. The initial field of the struct has pointer type, but the initializer expression is given as '{0}'. In order to suppress the warning, we simply replace the initializer with '{NULL}'. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'builtin/config.c')
-rw-r--r--builtin/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/config.c b/builtin/config.c
index f881053..e796af4 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -165,7 +165,7 @@ static int collect_config(const char *key_, const char *value_, void *cb)
static int get_value(const char *key_, const char *regex_)
{
int ret = CONFIG_GENERIC_ERROR;
- struct strbuf_list values = {0};
+ struct strbuf_list values = {NULL};
int i;
if (use_key_regexp) {