Eldbus: fix potential unsigned int underflow.
authorTom Hacohen <tom@stosb.com>
Wed, 22 Apr 2015 12:17:28 +0000 (13:17 +0100)
committerTom Hacohen <tom@stosb.com>
Wed, 22 Apr 2015 12:17:31 +0000 (13:17 +0100)
commit5e4b523d51c11d073def64e3a2dd268eb3a9ae22
tree8101632d9bec539a66596d90207c54945b47616f
parent5b5b7113b7d24cb8b3935834a99eaf23393605ec
Eldbus: fix potential unsigned int underflow.

Subtracting two unsigned values results in an unsigned value, which means
abs() will have no effect.
This also means that if base is smaller than size, we'll have an
unsigned int underflow.

I did it this way (with the if) because it looked like base might be
smaller than size. However, please remove the if (and don't reinstate
the abs) if this is not the case.
src/lib/eldbus/eldbus_message_to_eina_value.c