Re: [PATCH] format-patch -n: make sorting easier by padding number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, 9 Feb 2007, Johannes Schindelin wrote:

> +static unsigned int log10(unsigned int number)
> +{
> +	unsigned int i = 10, result = 1;
> +	while (i < number) {

D'oh. Make that "<=", please.

> +		i *= 10;
> +		result++;
> +	}
> +	return result;
> +}

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]