mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
OSTCTools - remove useless pointer ldc_dat
This device_data_t pointer was a remnant from initial work. It is useless and can be safely removed. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
40af11d2d2
commit
a74c06c723
1 changed files with 5 additions and 9 deletions
14
ostctools.c
14
ostctools.c
|
@ -40,22 +40,18 @@ static dc_descriptor_t *ostc_get_data_descriptor(int data_model, dc_family_t dat
|
||||||
*/
|
*/
|
||||||
static int ostc_prepare_data(int data_model, dc_family_t dc_fam, device_data_t *dev_data)
|
static int ostc_prepare_data(int data_model, dc_family_t dc_fam, device_data_t *dev_data)
|
||||||
{
|
{
|
||||||
device_data_t *ldc_dat = calloc(1, sizeof(device_data_t));
|
|
||||||
dc_descriptor_t *data_descriptor;
|
dc_descriptor_t *data_descriptor;
|
||||||
|
|
||||||
*ldc_dat = *dev_data;
|
dev_data->device = NULL;
|
||||||
ldc_dat->device = NULL;
|
dev_data->context = NULL;
|
||||||
ldc_dat->context = NULL;
|
|
||||||
|
|
||||||
data_descriptor = ostc_get_data_descriptor(data_model, dc_fam);
|
data_descriptor = ostc_get_data_descriptor(data_model, dc_fam);
|
||||||
if (data_descriptor) {
|
if (data_descriptor) {
|
||||||
ldc_dat->descriptor = data_descriptor;
|
dev_data->descriptor = data_descriptor;
|
||||||
ldc_dat->vendor = copy_string(data_descriptor->vendor);
|
dev_data->vendor = copy_string(data_descriptor->vendor);
|
||||||
ldc_dat->model = copy_string(data_descriptor->product);
|
dev_data->model = copy_string(data_descriptor->product);
|
||||||
*dev_data = *ldc_dat;
|
|
||||||
} else
|
} else
|
||||||
return 0;
|
return 0;
|
||||||
free(ldc_dat);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue