Re: [PATCH 1/4] fast-import: stricter parsing of integer options

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

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> +static unsigned long ulong_arg(const char *option, const char *arg)
> +{
> +	char *endptr;
> +	unsigned long rv = strtoul(arg, &endptr, 0);
> +	if (strchr(arg, '-') || endptr == arg || *endptr)
> +		die("%s: argument must be an unsigned integer", option);

Micronit.

It probably is Ok for the target audience, but it might be more proper to
call it "non-negative integer" ("unsigned integer" is a container to hold
such quantity).
--
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]