Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added citation link

...

This code resembles the test for wraparound from the sprint() function as implemented for the Plan 9 operating system. If buf + len < buf evaluates to true, len is assigned the remaining space minus one byte. However, because the expression buf + len < buf constitutes undefined behavior, compilers can assume this condition will never occur and optimize away the entire conditional statement.

...