summaryrefslogtreecommitdiffstats
path: root/ostctools.c
diff options
context:
space:
mode:
authorGravatar Salvador Cuñat <salvador.cunat@gmail.com>2015-09-10 00:06:48 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-09 17:23:39 -0700
commita74c06c7237df1030b20ce36b042e3546702020b (patch)
tree8d192a043760460bd43d909a86224c856914ae14 /ostctools.c
parent40af11d2d27612756f3d1d2fcb07d702d2f826a0 (diff)
downloadsubsurface-a74c06c7237df1030b20ce36b042e3546702020b.tar.gz
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>
Diffstat (limited to 'ostctools.c')
-rw-r--r--ostctools.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/ostctools.c b/ostctools.c
index a1727ce16..7b8c3c1f8 100644
--- a/ostctools.c
+++ b/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)
{
- device_data_t *ldc_dat = calloc(1, sizeof(device_data_t));
dc_descriptor_t *data_descriptor;
- *ldc_dat = *dev_data;
- ldc_dat->device = NULL;
- ldc_dat->context = NULL;
+ dev_data->device = NULL;
+ dev_data->context = NULL;
data_descriptor = ostc_get_data_descriptor(data_model, dc_fam);
if (data_descriptor) {
- ldc_dat->descriptor = data_descriptor;
- ldc_dat->vendor = copy_string(data_descriptor->vendor);
- ldc_dat->model = copy_string(data_descriptor->product);
- *dev_data = *ldc_dat;
+ dev_data->descriptor = data_descriptor;
+ dev_data->vendor = copy_string(data_descriptor->vendor);
+ dev_data->model = copy_string(data_descriptor->product);
} else
return 0;
- free(ldc_dat);
return 1;
}