On Tue, Feb 4, 2014 at 8:22 PM, Lukas Fleischer <[email protected]> wrote:
>
>     return age2 - age1;
> -static int cmp_age(int age1, int age2)
> -{
> -       if (age1 != 0 && age2 != 0)
> -               return age2 - age1;
> -
> -       if (age1 == 0 && age2 == 0)
> -               return 0;
> -
> -       if (age1 == 0)
> -               return +1;
> -
> -       return -1;
> -}


cmp_age(-1, 0) returns -1

0 - -1 returns 1
_______________________________________________
CGit mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/cgit

Reply via email to