Hi Marcel, >> + for (i = 0; i < service->num_chrcs; i++) { >> + free((bt_gatt_descriptor_t *) service->chrcs[i].chrc.descs); > > I must have overlooked these before, but that casting for free() should not be needed at all. > Without the cast the code will generate a compiler warning, since |descs| is declared as "const bt_descriptor_t *". I'd rather keep it as const since external code will access it but I need the cast to avoid the warning. I could cast it to void* if that makes it shorter. >> + >> + be16 = htons(uuid16); >> + memcpy(rhs_uuid + 2, &be16, sizeof(be16)); > > You might away with that the be16 and rhs_uuid are properly aligned here. However that is a dangerous game and I would rather see that you use put_be16() here. > Makes sense. FYI, I took this straight from bt_uuid16_to_uuid128 in lib/uuid.c. -Arman -- 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