Date: Thu, 13 May 2004 21:24:17 -0500 From: Larry Rosenman <ler@lerctr.org> To: "Brandon S. Allbery KF8NH" <allbery@ece.cmu.edu> Cc: freebsd-current@freebsd.org Subject: Re: strtod vs NAN? Message-ID: <D87E1560D4C5C3A8BEAD2B25@lerlaptop.lerctr.org> In-Reply-To: <1084501282.6477.11.camel@rushlight.kf8nh.com> References: <9AE9B859FD197218F21D81D0@lerlaptop.lerctr.org> <1084501282.6477.11.camel@rushlight.kf8nh.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--==========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 <allbery@ece.cmu.edu> 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==========--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D87E1560D4C5C3A8BEAD2B25>