I've been using Bosch Sensortec APIs for many years and the coding style has always bothered me. In particular, the convolved if/else statements. This style of programming is not just ugly but is also more error prone (check out this article).
Is there anyone who would argue that the following change is not an improvement?
And this is one of the least offensive examples.