]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Fix build
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 16 Dec 2018 13:04:04 +0000 (14:04 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 16 Dec 2018 13:04:04 +0000 (14:04 +0100)
lookup_identifier_t has a few array members.
To zero-initialize these we need a pair of extra braces.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80454

src/utils_vl_lookup_test.c

index 274ddcd4dc93f77bf5f623331f2b45b298ed3c10..1cb7b65bfda6b3b6d44e38cfc9d4a5a8b3349879 100644 (file)
@@ -85,7 +85,7 @@ static int checked_lookup_add(lookup_t *obj, /* {{{ */
                               char const *plugin_instance, char const *type,
                               char const *type_instance,
                               unsigned int group_by) {
-  lookup_identifier_t ident = {0};
+  lookup_identifier_t ident = {{0}};
   void *user_class;
 
   strncpy(ident.host, host, sizeof(ident.host) - 1);