Fix uninitilized variable issue 75/132775/2
authorHyeongsik Min <hyeongsik.min@samsung.com>
Wed, 7 Jun 2017 11:57:14 +0000 (20:57 +0900)
committerHyeongsik Min <hyeongsik.min@samsung.com>
Thu, 8 Jun 2017 01:35:37 +0000 (10:35 +0900)
Fix the issue that uninitilized local variable is read in
handle_i2c_smbus_ioctl().

Change-Id: I926c81a2ec024dc124339d503f0a99f9672055f6
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
src/daemon/peripheral_bus.c

index f064392..7c548a6 100644 (file)
@@ -429,7 +429,7 @@ gboolean handle_i2c_smbus_ioctl(
        peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
        pb_i2c_data_h i2c_handle = GUINT_TO_POINTER(handle);
        const gchar *id;
-       uint16_t data;
+       uint16_t data = 0xFFFF;
 
        /* Handle validation */
        if (!i2c_handle || !i2c_handle->client_info.id) {