This patch modifies return value of bt_uuid_to_le function to uuid length in case of successful conversion. --- lib/uuid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/uuid.c b/lib/uuid.c index d2ad66d..b962adf 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -343,7 +343,7 @@ int bt_uuid_to_le(const bt_uuid_t *src, void *dst) switch (src->type) { case BT_UUID16: bt_put_le16(src->value.u16, dst); - return 0; + return sizeof(src->value.u16); case BT_UUID32: bt_uuid32_to_uuid128(src, &uuid); src = &uuid; @@ -351,7 +351,7 @@ int bt_uuid_to_le(const bt_uuid_t *src, void *dst) case BT_UUID128: /* Convert from 128-bit BE to LE */ bswap_128(&src->value.u128, dst); - return 0; + return sizeof(src->value.u128); case BT_UUID_UNSPEC: default: return -EINVAL; -- 2.1.0 -- 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