Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:08

Jonathan Nieder [off-list ref] 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).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help