Hi Santiago, On Thu, Oct 20, 2011 at 6:46 AM, Santiago Carot-Nemesio <sancane@xxxxxxxxx> wrote: > + p = (uint16_t *) value; > + min = btohs(bt_get_unaligned(p)); > + p = (uint16_t *) &value[2]; > + max = btohs(bt_get_unaligned(p)); Why not use att_get_u16() here? it does exactly what you want (and no casting is necessary). Regards, -- Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil -- 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