[PATCH] lib/uuid: Fix 32 bit bt_uuid to le

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Conversion from be to le can be done using bluetooth funcion.
---
 lib/uuid.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/uuid.c b/lib/uuid.c
index 15fbd66..2f598b8 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -338,15 +338,13 @@ int bt_uuid_strcmp(const void *a, const void *b)
 
 int bt_uuid_to_le(const bt_uuid_t *src, void *dst)
 {
-	bt_uuid_t uuid;
-
 	switch (src->type) {
 	case BT_UUID16:
 		bt_put_le16(src->value.u16, dst);
 		return 0;
 	case BT_UUID32:
-		bt_uuid_to_uuid128(src, &uuid);
-		/* Fallthrough */
+		bt_put_le32(src->value.u32, dst);
+		return 0;
 	case BT_UUID128:
 		/* Convert from 128-bit BE to LE */
 		bswap_128(&src->value.u128, dst);
-- 
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




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux