Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Again, using a relational operator instead of equivalence guarantees loop termination. If begin >= end the loop never executes its body.

Code Block
bgColor#ccccff
langc
void f(size_t begin, size_t end) {
  size_t i;
  for (i = begin; i < end; ++i) {
    /* ... */
  }
}

...