From owner-svn-src-head@FreeBSD.ORG Wed Aug 21 17:21:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2599B33E for ; Wed, 21 Aug 2013 17:21:52 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ABBB22B53 for ; Wed, 21 Aug 2013 17:21:51 +0000 (UTC) Received: by mail-ee0-f53.google.com with SMTP id b15so416428eek.40 for ; Wed, 21 Aug 2013 10:21:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:openpgp:content-type :content-transfer-encoding; bh=CLtk3dJZ2ZFtIbX/Ci55xMIMcmhgl0jyYmyiVX0BSL8=; b=EwRWocaN3Yqd0pmkEvYxB8jaUhXYzYw02O467kZd8RGET9Qz/n8un0leOqjq/b6anN dSMX+MWPsuZAYUZn1HqIbVhJZSvyps3+VRiQkc9I+naz9oaQJFvKo9SF+/G0YEh0r/jF +CbJHoDwB/Em0wF3HY0HpSGcvPt8jaWIUD55vFfaRQKDLV9Tjy3AvdR1dJkxiLfE4cyt mnJT4O8tyL3wM6KI6xXINPpLldvmpr0cqfVwCrF7ljZvgh1GSBekmueCLXlHJ+4i07xS NTV2G+sm+X6/6EwohgnOGibsqkToVsyeEHfvgQwCXliyN7Vpjq6WfOuiAkgNY+/Rxw4C 32yw== X-Gm-Message-State: ALoCoQmUKjCknVzx5k81OFqzNoXjoSWDCAUdqYWlXjbdYtNzQW40RE4VW0mWNNxpJv/mlWUqcmO0 X-Received: by 10.15.43.13 with SMTP id w13mr11887326eev.37.1377105709628; Wed, 21 Aug 2013 10:21:49 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id a1sm11309096eem.1.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 10:21:49 -0700 (PDT) Message-ID: <5214F72B.7070006@freebsd.org> Date: Wed, 21 Aug 2013 21:21:47 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Sergey Kandaurov Subject: Re: svn commit: r254600 - head/lib/libutil References: <201308211646.r7LGk6eV051215@svn.freebsd.org> In-Reply-To: <201308211646.r7LGk6eV051215@svn.freebsd.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 17:21:52 -0000 On 21.08.2013 20:46, Sergey Kandaurov wrote: > number = strtoumax(buf, &endptr, 0); > > + if (number == UINTMAX_MAX && errno == ERANGE) { > + return (-1); > + } You need to reset errno before strtoumax() call (errno = 0), because any of previous functions may left it as ERANGE. -- http://ache.vniz.net/ bitcoin:1G6ugdNY6e5jx1GVnAU2ntj2NEfmjKG85r