Versions Compared

Key

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

...

In this compliant solution, stringify is declared as an unsigned integer. The value of the result of the right shift operation is the integral part of the quotient of stringify / 2^24^2^24.

Code Block
bgColorccccff
int rc = 0;
unsigned int stringify = 0x80000000;
char buf[sizeof("256")];
rc = snprintf(buf, sizeof(buf), "%u", stringify >> 24);
if (rc == -1 || rc >= sizeof(buf)) {
  /* handle error */
}

...