From af5147526358a771a6492b49f22e7597cda7bb14 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 27 Jul 2016 16:54:37 +0100 Subject: [PATCH] trivial: Fix two tiny bugs spotted by clang --- libebitdo/ebitdo-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libebitdo/ebitdo-device.c b/libebitdo/ebitdo-device.c index 6fae9e178..f18327914 100644 --- a/libebitdo/ebitdo-device.c +++ b/libebitdo/ebitdo-device.c @@ -353,7 +353,7 @@ ebitdo_device_open (EbitdoDevice *device, GError **error) { EbitdoDevicePrivate *priv = GET_PRIVATE (device); gdouble tmp; - guint32 version_tmp; + guint32 version_tmp = 0; guint32 serial_tmp[9]; guint i; @@ -413,6 +413,7 @@ ebitdo_device_open (EbitdoDevice *device, GError **error) error)) { return FALSE; } + memset (serial_tmp, 0x00, sizeof (serial_tmp)); if (!ebitdo_device_receive (device, (guint8 *) &serial_tmp, sizeof(serial_tmp), error)) {