openharmony_kernel_liteos_m/kal/posix/musl_src/math/abs.c

7 lines
62 B
C

#include <stdlib.h>
int abs(int a)
{
return a>0 ? a : -a;
}