Hi Claudio, On Wed, Mar 12, 2014, Claudio Takahasi wrote: > +static inline void put_uuid(const bt_uuid_t *src, void *dst) > +{ > + if (src->type == BT_UUID16) > + put_unaligned(cpu_to_le16(src->value.u16), (uint16_t *) dst); I thought you were going to add helpers like put_le16() to shared/util.h first? > +static struct btd_attribute *new_const_attribute(const bt_uuid_t *type, > + const uint8_t *value, > + uint16_t len) > +{ > + struct btd_attribute *attr = malloc0(sizeof(struct btd_attribute) + > + len); First of all I think it'd be better (coding style consistency-wise) to do the allocation separately from the declaration of the variable. Secondly, malloc0 can return NULL (unlike g_malloc0) so you'd need to check for that. Johan -- 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