Initialize the fingerprint before use.
The fingerprint is used unconditionally, regardless of whether it's explicitly set by the application or not. Therefore it needs to be initialized properly.
This commit is contained in:
parent
6845d9b77c
commit
cde70334b0
@ -188,6 +188,7 @@ cressi_edy_device_open (dc_device_t **out, dc_context_t *context, const char *na
|
||||
// Set the default values.
|
||||
device->port = NULL;
|
||||
device->model = 0;
|
||||
memset (device->fingerprint, 0, sizeof (device->fingerprint));
|
||||
|
||||
// Open the device.
|
||||
int rc = serial_open (&device->port, context, name);
|
||||
|
||||
@ -89,6 +89,7 @@ cressi_leonardo_device_open (dc_device_t **out, dc_context_t *context, const cha
|
||||
|
||||
// Set the default values.
|
||||
device->port = NULL;
|
||||
memset (device->fingerprint, 0, sizeof (device->fingerprint));
|
||||
|
||||
// Open the device.
|
||||
int rc = serial_open (&device->port, context, name);
|
||||
|
||||
@ -164,6 +164,7 @@ diverite_nitekq_device_open (dc_device_t **out, dc_context_t *context, const cha
|
||||
|
||||
// Set the default values.
|
||||
device->port = NULL;
|
||||
memset (device->fingerprint, 0, sizeof (device->fingerprint));
|
||||
|
||||
// Open the device.
|
||||
int rc = serial_open (&device->port, context, name);
|
||||
|
||||
@ -152,6 +152,7 @@ zeagle_n2ition3_device_open (dc_device_t **out, dc_context_t *context, const cha
|
||||
|
||||
// Set the default values.
|
||||
device->port = NULL;
|
||||
memset (device->fingerprint, 0, sizeof (device->fingerprint));
|
||||
|
||||
// Open the device.
|
||||
int rc = serial_open (&device->port, context, name);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user