From owner-freebsd-current@FreeBSD.ORG Tue Dec 11 12:07:06 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 898AA19C; Tue, 11 Dec 2012 12:07:06 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 01FF48FC0C; Tue, 11 Dec 2012 12:07:05 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id qBBC730N091931; Tue, 11 Dec 2012 16:07:03 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id qBBC73tC091930; Tue, 11 Dec 2012 16:07:03 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 11 Dec 2012 16:07:03 +0400 From: Gleb Smirnoff To: Artyom Mirgorodskiy Subject: Re: rev 244030 route command is not working Message-ID: <20121211120703.GI48639@glebius.int.ru> References: <2452291.zQQ4fSp1fM@home.alkar.net> <20121211071334.GS48639@glebius.int.ru> <1740464.YojJrNfMlV@notebook.alkar.net> <13928549.1YcT8qshV5@notebook.alkar.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="VdOwlNaOFKGAtAAV" Content-Disposition: inline In-Reply-To: <13928549.1YcT8qshV5@notebook.alkar.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2012 12:07:06 -0000 --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--