Whitespace cleanup

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-09-09 17:26:54 -07:00
parent a74c06c723
commit 7a4b046c76

View file

@ -13,7 +13,8 @@
static dc_descriptor_t *ostc_get_data_descriptor(int data_model, dc_family_t data_fam) 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_iterator_t *iterator = NULL;
dc_status_t rc; 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->descriptor = data_descriptor;
dev_data->vendor = copy_string(data_descriptor->vendor); dev_data->vendor = copy_string(data_descriptor->vendor);
dev_data->model = copy_string(data_descriptor->product); dev_data->model = copy_string(data_descriptor->product);
} else } else {
return 0; return 0;
}
return 1; 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 // 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; dc_fam = DC_FAMILY_HW_OSTC;
else { } else {
switch (buffer[8]) { switch (buffer[8]) {
case 0x22: case 0x22:
dc_fam = DC_FAMILY_HW_FROG; 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); add_extra_data(&ostcdive->dc, "Serial", ostcdive->dc.serial);
*ptr = *(ptr)->next; *ptr = *(ptr)->next;
} }
} else } else {
add_extra_data(&ostcdive->dc, "Serial", ostcdive->dc.serial); add_extra_data(&ostcdive->dc, "Serial", ostcdive->dc.serial);
}
record_dive_to_table(ostcdive, divetable); record_dive_to_table(ostcdive, divetable);
mark_divelist_changed(true); mark_divelist_changed(true);
sort_table(divetable); sort_table(divetable);
fclose(archive); fclose(archive);
out: free(devdata); out:
free(devdata);
free(buffer); free(buffer);
} }