code: 9ferno

ref: 1882e954b0a8bdca38eff596783be26ca466f944
dir: /libkern/abs.c/

View raw version
#include <lib9.h>

int
abs(int a)
{
	if(a < 0)
		return -a;
	return a;
}

long
labs(long a)
{
	if(a < 0)
		return -a;
	return a;
}