On Wednesday, 24 December 2014 at 08:39:26 UTC, Ola Fosheim Grøstad wrote:
int myfunc(int n){
    ...lotsofstuff...
    x = mayormaynotchange(n);
   ...lotsofstuff...
   return n>0 ? x : 0;  // modified from "return x"
}

If you require another variable for a sanitized version of `n`, you get confused, when to use `n` and when to use `x`, they are almost the same and if you pick a wrong value, the code will break sometimes.

Reply via email to