[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem backporting libhmsbeagle


On 17/06/17 12:03, Gunter Königsmann wrote:
> Even if these code lines would work they probably should be reformulated
> by upstream so they are easier to read:
> ++i assigns I the value I+1 and returns the new i. And then i is
> assigned another new value by the i= in the same line...
> ...a better way to express what I believe the line should mean would be:
> ++i;
> i &= 3;
> Perhaps the c compiler is as unsure which assignment should have the
> precedence as I am.

Or "i = (i + 1) & 0x3" which I think looks better.

The original code invokes undefined behavior so is wrong anyway. I have
no idea why this only affects jessie-backports though.


Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: