[Skiboot] [PATCH V2 1/3] libc: Add abs() to stdlib
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Thu Sep 29 16:07:16 AEST 2016
On 09/28/2016 05:47 PM, Shilpasri G Bhat wrote:
> Signed-off-by: Shilpasri G Bhat <shilpa.bhat at linux.vnet.ibm.com>
> ---
.../...
> +
> +/**
> + * abs() - Computes the absolute value of integer
> + * @n: integer number
> + *
> + * Returns the absolute value of the integer argument
> + */
> +
> +int abs(int n)
> +{
> + return (n > 0) ? n : -n;
> +}
Can you please add some test cases for this new function?
-Vasant
More information about the Skiboot
mailing list