code cleanup: introduce empty_cylinder constant

This deals with the issue of initializing structs in C++.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-01-06 19:00:20 -08:00
parent 4e419f7445
commit cef30619d0
12 changed files with 18 additions and 16 deletions

View file

@ -317,7 +317,7 @@ static unsigned char *dt_dive_parser(unsigned char *runner, struct dive *dt_dive
*/
read_bytes(2);
if (tmp_2bytes != 0x7FFF) {
cylinder_t cyl = { 0 };
cylinder_t cyl = empty_cylinder;
cyl.type.size.mliter = tmp_2bytes * 10;
cyl.type.description = "";
cyl.start.mbar = 200000;