Hi Szymon, On Fri, Aug 31, 2012 at 7:49 AM, Szymon Janc <szymon.janc@xxxxxxxxx> wrote: >> > case SDP_INT16: >> > - d->val.int16 = bt_get_unaligned((int16_t *) value); >> > + d->val.int16 = bt_get_16(value); >> > d->unitSize += sizeof(int16_t); >> > break; >> >> Is this safe? You are assigning a unsigned type (return value from >> bt_get_16()) to a signed one. Same applies for SDP_INT32 and SDP_INT64 > > Mixing signed and unsigned could introduce some problem when you interpret data (e.g. in > comparison), but here value will be simply assigned. > > I could add an explicit cast here (as this might bother some lint-like tools) if you prefer. I don't think it is necessary (I was just confirming if it was safe and intentional), so I'll leave to those who will apply your patches :) 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