diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-01-06 19:00:20 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-01-10 02:37:03 +0900 |
commit | cef30619d0d7296e1730d87dae1c9712ac5cd822 (patch) | |
tree | 655e9c94f0272b38480b6fc6e5734388c5bc9408 /core/parse-xml.c | |
parent | 4e419f74456bc3ac04e8d8c7550153434e36f475 (diff) | |
download | subsurface-cef30619d0d7296e1730d87dae1c9712ac5cd822.tar.gz |
code cleanup: introduce empty_cylinder constant
This deals with the issue of initializing structs in C++.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/parse-xml.c')
-rw-r--r-- | core/parse-xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/parse-xml.c b/core/parse-xml.c index a7aec8c6a..4058603d3 100644 --- a/core/parse-xml.c +++ b/core/parse-xml.c @@ -1003,7 +1003,7 @@ static void divinglog_place(char *place, struct dive *d, struct parser_state *st static int divinglog_dive_match(struct dive *dive, const char *name, char *buf, struct parser_state *state) { /* For cylinder related fields, we might have to create a cylinder first. */ - cylinder_t cyl = { 0 }; + cylinder_t cyl = empty_cylinder; if (MATCH("tanktype", utf8_string, &cyl.type.description)) { cylinder_t *cyl0 = get_or_create_cylinder(dive, 0); free((void *)cyl0->type.description); |