trivial: Fix two tiny bugs spotted by clang

This commit is contained in:
Richard Hughes 2016-07-27 16:54:37 +01:00
parent 33a518a615
commit af51475263

View File

@ -353,7 +353,7 @@ ebitdo_device_open (EbitdoDevice *device, GError **error)
{ {
EbitdoDevicePrivate *priv = GET_PRIVATE (device); EbitdoDevicePrivate *priv = GET_PRIVATE (device);
gdouble tmp; gdouble tmp;
guint32 version_tmp; guint32 version_tmp = 0;
guint32 serial_tmp[9]; guint32 serial_tmp[9];
guint i; guint i;
@ -413,6 +413,7 @@ ebitdo_device_open (EbitdoDevice *device, GError **error)
error)) { error)) {
return FALSE; return FALSE;
} }
memset (serial_tmp, 0x00, sizeof (serial_tmp));
if (!ebitdo_device_receive (device, if (!ebitdo_device_receive (device,
(guint8 *) &serial_tmp, sizeof(serial_tmp), (guint8 *) &serial_tmp, sizeof(serial_tmp),
error)) { error)) {