On Tue, Dec 11, 2012 at 12:21:20PM +0200, Artyom Mirgorodskiy wrote: A> Gleb, when I reset errno at the begin of fiboptlist_csv() everything work as expected.
Artyom, can you please test attached patch? -- Totus tuus, Glebius.
Index: route.c =================================================================== --- route.c (revision 244082) +++ route.c (working copy) @@ -271,8 +271,7 @@ case 0: case 1: fib[i] = strtol(token, &endptr, 0); - if (*endptr != '\0' || (fib[i] == 0 && - (errno == EINVAL || errno == ERANGE))) + if (*endptr != '\0') error = 1; break; default: @@ -336,8 +335,7 @@ goto fiboptlist_csv_ret; } else { fib = strtol(token, &endptr, 0); - if (*endptr != '\0' || (fib == 0 && - (errno == EINVAL || errno == ERANGE))) { + if (*endptr != '\0') { error = 1; goto fiboptlist_csv_ret; }
_______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"