From owner-freebsd-current@FreeBSD.ORG Thu May 13 19:24:21 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55C1E16A4CE for ; Thu, 13 May 2004 19:24:21 -0700 (PDT) Received: from lerami.lerctr.org (lerami.lerctr.org [192.147.25.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AF0443D5A for ; Thu, 13 May 2004 19:24:20 -0700 (PDT) (envelope-from ler@lerctr.org) Received: from lerlaptop.lerctr.org ([192.147.25.14]) by lerami.lerctr.org with asmtp (Exim 4.34) id 1BOSN1-0001mA-08; Thu, 13 May 2004 21:24:19 -0500 Date: Thu, 13 May 2004 21:24:17 -0500 From: Larry Rosenman To: "Brandon S. Allbery KF8NH" Message-ID: In-Reply-To: <1084501282.6477.11.camel@rushlight.kf8nh.com> References: <9AE9B859FD197218F21D81D0@lerlaptop.lerctr.org> <1084501282.6477.11.camel@rushlight.kf8nh.com> X-Mailer: Mulberry/3.1.3 (Linux/x86) X-PGP-Info: All other keys are old/dead. X-PGP-Key: 0x3c49bdd6 X-PGP-Fingerprint: D0D1 3C11 F42F 6B29 FA67 6BF3 AD13 4685 3C49 BDD6 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="==========FCBCE97399A7A9D3C4A0==========" cc: freebsd-current@freebsd.org Subject: Re: strtod vs NAN? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Fri, 14 May 2004 02:24:21 -0000 --==========FCBCE97399A7A9D3C4A0========== Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline --On Thursday, May 13, 2004 22:21:23 -0400 "Brandon S. Allbery KF8NH"=20 wrote: > On Thu, 2004-05-13 at 22:14, Larry Rosenman wrote: >> char **ptr; >> >> num=3Dstrtod(input,ptr); > > Since ptr is uninitialized, strtod() is trying to store a pointer into > random memory. You probably want to say this instead: > > char *ptr; > > num =3D strtod(input, &ptr); Thanks. Stupid C error(s) from a novice :). That was indeed it. --=20 Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 --==========FCBCE97399A7A9D3C4A0========== Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFApC3SrRNGhTxJvdYRAtosAJ97qw3ex16sqM5PDbmigoIwgpGMCACeLyhb ZUzKkHFHa3O3RXSbH5U9ZZY= =Sr84 -----END PGP SIGNATURE----- --==========FCBCE97399A7A9D3C4A0==========--