From cdbc8c54a36bcff1f6656425f0f829aee5122e6b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 21 Jan 2014 14:47:31 +0200 Subject: [PATCH] src/uuid-helper: Remove unnecessary GLib usage" --- src/uuid-helper.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/uuid-helper.c b/src/uuid-helper.c index 3cca02446..bce36b0b3 100644 --- a/src/uuid-helper.c +++ b/src/uuid-helper.c @@ -27,14 +27,14 @@ #include #include +#include #include +#include #include #include #include -#include - #include "uuid-helper.h" char *bt_modalias(uint16_t source, uint16_t vendor, @@ -100,9 +100,9 @@ char *bt_uuid2string(uuid_t *uuid) memcpy(&data5, &uuid128.value.uuid128.data[14], 2); err = asprintf(&str, "%.8x-%.4x-%.4x-%.4x-%.8x%.4x", - g_ntohl(data0), g_ntohs(data1), - g_ntohs(data2), g_ntohs(data3), - g_ntohl(data4), g_ntohs(data5)); + ntohl(data0), ntohs(data1), + ntohs(data2), ntohs(data3), + ntohl(data4), ntohs(data5)); if (err < 0) return NULL; @@ -151,7 +151,7 @@ static uint16_t name2class(const char *pattern) return 0; } -static inline gboolean is_uuid128(const char *string) +static inline bool is_uuid128(const char *string) { return (strlen(string) == 36 && string[8] == '-' && @@ -218,12 +218,12 @@ int bt_string2uuid(uuid_t *uuid, const char *string) &data0, &data1, &data2, &data3, &data4, &data5) == 6) { uint8_t val[16]; - data0 = g_htonl(data0); - data1 = g_htons(data1); - data2 = g_htons(data2); - data3 = g_htons(data3); - data4 = g_htonl(data4); - data5 = g_htons(data5); + data0 = htonl(data0); + data1 = htons(data1); + data2 = htons(data2); + data3 = htons(data3); + data4 = htonl(data4); + data5 = htons(data5); memcpy(&val[0], &data0, 4); memcpy(&val[4], &data1, 2); -- 2.47.3