This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: LIBC - improve strptime()


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 at mlbassoc dot 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]