Versions Compared

Key

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

...

Code Block
bgColor#ccccff
signed int si1, si2, sum;

if (((si1>0) && (si2>0) && (si1 > (INT_MAX-si2))) 
 ||
    ((si1<0) && (si2<0) && (si1 < (INT_MIN-si2)))) 
{
   /* handle error condition */
}

sum = si1 + si2;

...