LIBC - improve strptime()
Jonathan Larmour
jifl@eCosCentric.com
Tue Mar 18 17:28:00 GMT 2003
Gary Thomas wrote:
> Index: language/c/libc/time/current/ChangeLog
> ===================================================================
> RCS file: /misc/cvsfiles/ecos/packages/language/c/libc/time/current/ChangeLog,v
> retrieving revision 1.13
> diff -u -5 -p -r1.13 ChangeLog
> --- language/c/libc/time/current/ChangeLog 24 Feb 2003 14:28:38 -0000 1.13
> +++ language/c/libc/time/current/ChangeLog 18 Mar 2003 14:33:35 -0000
> @@ -1,5 +1,10 @@
> +2003-03-18 Gary Thomas <gary@mlbassoc.com>
> +
> + * src/strptime.cxx: Initialize time structure to a well known, valid,
> + time/date so even if there is an error, it still makes [some] sense.
That sounds risky to me. By giving a value that looks like it "might be
right", people may not notice problems as easily when debugging.
I think explicitly setting to an _invalid_ value, such as memsetting it to
0 may be better.
After all, we're only talking about the potential case of someone ignoring
the return value anyway.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
More information about the Ecos-patches
mailing list