Both manufacturer and sub_version already have correct type and struct is marked as packed so there is no need to memcpy to temp variable. --- android/hal-bluetooth.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c index 3dbc435..9f9814a 100644 --- a/android/hal-bluetooth.c +++ b/android/hal-bluetooth.c @@ -150,17 +150,14 @@ static void device_props_to_hal(bt_property_t *send_props, { static bt_remote_version_t e; const struct hal_prop_device_info *p; - uint16_t tmp; send_props[i].val = &e; send_props[i].len = sizeof(e); p = (struct hal_prop_device_info *) prop->val; - memcpy(&tmp, &p->manufacturer, sizeof(tmp)); - e.manufacturer = tmp; - memcpy(&tmp, &p->sub_version, sizeof(tmp)); - e.sub_ver = tmp; + e.manufacturer = p->manufacturer; + e.sub_ver = p->sub_version; e.version = p->version; } break; -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html