mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a74c06c723
commit
7a4b046c76
1 changed files with 49 additions and 46 deletions
17
ostctools.c
17
ostctools.c
|
@ -13,7 +13,8 @@
|
|||
|
||||
static dc_descriptor_t *ostc_get_data_descriptor(int data_model, dc_family_t data_fam)
|
||||
{
|
||||
dc_descriptor_t *descriptor = NULL, *current = NULL;;
|
||||
dc_descriptor_t *descriptor = NULL, *current = NULL;
|
||||
;
|
||||
dc_iterator_t *iterator = NULL;
|
||||
dc_status_t rc;
|
||||
|
||||
|
@ -50,8 +51,9 @@ static int ostc_prepare_data(int data_model, dc_family_t dc_fam, device_data_t *
|
|||
dev_data->descriptor = data_descriptor;
|
||||
dev_data->vendor = copy_string(data_descriptor->vendor);
|
||||
dev_data->model = copy_string(data_descriptor->product);
|
||||
} else
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -104,9 +106,9 @@ void ostctools_import(const char *file, struct dive_table *divetable)
|
|||
}
|
||||
|
||||
// Try to determine the dc family based on the header type
|
||||
if (buffer[2] == 0x20 || buffer[2] == 0x21)
|
||||
if (buffer[2] == 0x20 || buffer[2] == 0x21) {
|
||||
dc_fam = DC_FAMILY_HW_OSTC;
|
||||
else {
|
||||
} else {
|
||||
switch (buffer[8]) {
|
||||
case 0x22:
|
||||
dc_fam = DC_FAMILY_HW_FROG;
|
||||
|
@ -178,13 +180,14 @@ void ostctools_import(const char *file, struct dive_table *divetable)
|
|||
add_extra_data(&ostcdive->dc, "Serial", ostcdive->dc.serial);
|
||||
*ptr = *(ptr)->next;
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
add_extra_data(&ostcdive->dc, "Serial", ostcdive->dc.serial);
|
||||
|
||||
}
|
||||
record_dive_to_table(ostcdive, divetable);
|
||||
mark_divelist_changed(true);
|
||||
sort_table(divetable);
|
||||
fclose(archive);
|
||||
out: free(devdata);
|
||||
out:
|
||||
free(devdata);
|
||||
free(buffer);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue