summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2014-03-24 16:25:29 -0300
committerJohan Hedberg <johan.hedberg@intel.com>2014-03-24 22:05:08 +0200
commit05a9545a829f38da60c86f5df1462aa5a89f8962 (patch)
treeb6434bcfde009582f7063395f4dd6900de38308a /lib
parent3c3d0a8a323c7cb2de8f3c39abcc5ee88720fce6 (diff)
downloadbluez-05a9545a829f38da60c86f5df1462aa5a89f8962.tar.gz
lib: Remove hton128() from bt_uuid_to_string()
bt_uuid_to_string() helper should get the raw UUID value. Caller should convert the 128-bit UUID before call this helper (if applicable). bt_uuid_t stores 128-bit UUID using big-endian format (human-readable format), swapping byte order is not necessary.
Diffstat (limited to 'lib')
-rw-r--r--lib/uuid.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/uuid.c b/lib/uuid.c
index aa2d0cfdb..dbca330e3 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -154,10 +154,7 @@ int bt_uuid_to_string(const bt_uuid_t *uuid, char *str, size_t n)
unsigned int data4;
unsigned short data5;
- uint128_t nvalue;
- const uint8_t *data = (uint8_t *) &nvalue;
-
- hton128(&uuid->value.u128, &nvalue);
+ const uint8_t *data = (uint8_t *) &uuid->value.u128;
memcpy(&data0, &data[0], 4);
memcpy(&data1, &data[4], 2);