monitor: Fix build error in some targets
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 5 Jul 2022 17:43:46 +0000 (10:43 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
This fixes the following error:

monitor/att.c: In function 'print_attribute':
monitor/att.c:1850:35: error: lvalue required as unary '&' operand
                 print_uuid(label, &cpu_to_le16(uuid->value.u16), 2);

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
monitor/att.c

index f49ef20..e0a5d16 100644 (file)
@@ -1846,7 +1846,9 @@ static void print_attribute(struct gatt_db_attribute *attr)
        switch (uuid->type) {
        case BT_UUID16:
                sprintf(label, "Handle: 0x%4.4x Type", handle);
-               print_uuid(label, &cpu_to_le16(uuid->value.u16), 2);
+               print_field("%s: %s (0x%4.4x)", label,
+                               bt_uuid16_to_str(uuid->value.u16),
+                               uuid->value.u16);
                return;
        case BT_UUID128:
                sprintf(label, "Handle: 0x%4.4x Type", handle);