From owner-freebsd-arch Sat Jan 26 22:51:28 2002 Delivered-To: freebsd-arch@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id 9E47237B446; Sat, 26 Jan 2002 22:50:24 -0800 (PST) Received: (from ache@localhost) by nagual.pp.ru (8.11.6/8.11.6) id g0R6oG813297; Sun, 27 Jan 2002 09:50:16 +0300 (MSK) (envelope-from ache) Date: Sun, 27 Jan 2002 09:50:12 +0300 From: "Andrey A. Chernov" To: "Brian F. Feldman" Cc: Chad David , Bruce Evans , arch@FreeBSD.ORG Subject: Re: strtod() Message-ID: <20020127065011.GA13267@nagual.pp.ru> References: <20020126162924.A7726@colnta.acns.ab.ca> <200201270453.g0R4rwi92912@green.bikeshed.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200201270453.g0R4rwi92912@green.bikeshed.org> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Jan 26, 2002 at 23:53:58 -0500, Brian F. Feldman wrote: > > The problem is that 0.0 could be the right return value, but if errno was > EINVAL before calling strtod(), the caller makes a mistake in assuming > "retval == 0.0 && errno == EINVAL means failure". The caller _must_ set errno = 0 before the call, if he plan to check it afterwards. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message