Date: Tue, 11 Dec 2012 16:07:03 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Artyom Mirgorodskiy <artyom@ijminteractive.net> Cc: freebsd-current@FreeBSD.org Subject: Re: rev 244030 route command is not working Message-ID: <20121211120703.GI48639@glebius.int.ru> In-Reply-To: <13928549.1YcT8qshV5@notebook.alkar.net> References: <2452291.zQQ4fSp1fM@home.alkar.net> <20121211071334.GS48639@glebius.int.ru> <1740464.YojJrNfMlV@notebook.alkar.net> <13928549.1YcT8qshV5@notebook.alkar.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--VdOwlNaOFKGAtAAV
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
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.
--VdOwlNaOFKGAtAAV
Content-Type: text/x-diff; charset=koi8-r
Content-Disposition: attachment; filename="route.c.diff"
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;
}
--VdOwlNaOFKGAtAAV--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121211120703.GI48639>
