Versions Compared

Key

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

...

Code Block
bgColor#FFcccc
langc
signed long sl1,;
signed long sl2,;
signed long result;

/* Initialize sl1 and sl2 */

result = sl1 / sl2;

...

Code Block
bgColor#ccccff
langc
signed long sl1,;
signed long sl2,;
signed long result;

/* Initialize sl1 and sl2 */

if ( (sl2 == 0) || ( (sl1 == LONG_MIN) && (sl2 == -1) ) ) {
  /* Handle error condition */
}
else {
  result = sl1 / sl2;
}

...

Code Block
bgColor#FFcccc
langc
signed long sl1,;
signed long sl2,;
signed long result;

/* Initialize sl1 and sl2 */

result = sl1 % sl2;

...

Code Block
bgColor#ccccff
langc
signed long sl1,;
signed long sl2,;
signed long result;

/* Initialize sl1 and sl2 */

if ( (sl2 == 0 ) || ( (sl1 == LONG_MIN) && (sl2 == -1) ) ) {
  /* Handle error condition */
}
else {
  result = sl1 % sl2;
}

...