Reading the interrupt vector register (UCB0IV) automatically clears the corresponding interrupt flag. This means that the interrupt handler clears the flag before the other code has an opportunity to read it. If you do not want to use the interrupt, do not enable it (don't set the respective IE bits).
↧