From owner-svn-src-all@FreeBSD.ORG Wed Aug 21 17:21:57 2013 Return-Path: Delivered-To: svn-src-all@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 B766C345 for ; Wed, 21 Aug 2013 17:21:57 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-ea0-f174.google.com (mail-ea0-f174.google.com [209.85.215.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4A1E42B58 for ; Wed, 21 Aug 2013 17:21:56 +0000 (UTC) Received: by mail-ea0-f174.google.com with SMTP id z15so418125ead.5 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=lPMUBp1hiSaXaP18cYwCg1leoNOh8EOLGz1SeWOY3WY1QPQsjyuoMlnh3k2dydFcbb ZyI+AVpFf8J+O53mK/O4annJrHQtcDgQEOq7P85GqguvVochzRNVedPDVsf/rmcxTn5m JhCQwpKuTxPd8C5Jl05q3yBOuLOCPnQ/IaKKg635phx7BMbG2uPv1CWzjygLqUHUOV4g yers7KQ0BEoMk5t2ov/eqWPHndgARJQb+NdAJNulOu0F1ckRwi1Jdq09wD5R1tYstDCl B7BnaekQcqZ7OTnhy7mS7z7YGf72PIeKbKeOhq5Q+c5m9w0hVYP2OUhi+RtGmdCusQkX 2TiQ== X-Gm-Message-State: ALoCoQkiSU4nqXgu0fNNLwICs5kQe7O31+w8YuQAYCk2/FVuEFDh2xpwI8xV1SR0j+SzIJe7piXJ 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 17:21:57 -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