summaryrefslogtreecommitdiff
path: root/arch/x86/lib/misc.c
blob: bc35cde9769f181310571656d46918afd1d8dc8e (plain)
1
2
3
4
5
6
7
8
9
10
11
int num_digits(int val)
{
	int digits = 0;

	while (val) {
		val /= 10;
		digits++;
	}

	return digits;
}