Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! iiod-client: Send block dequeue request when previous one failed
- Loading branch information
a58629c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do these versions behave differently?
a58629c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or is it just cosmetic to make the intention clearer?
a58629c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at all - but Codacy is stupid and said that
(uint16_t)ret == 0
was always false.a58629c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure - if we first check ret < 0, how can ret become 0 afterwards?
a58629c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't be zero. We just check that the lower 16 bits are zero.
a58629c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think both code versions behave the same
a58629c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but anyway, I think the new version is easier to read. I was just curious if I understood the casting wrong.