This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

[PATCH] Fix getdata take 2 (was Re: problem with getdate)


On Tue, Jul 17, 2001 at 04:05:25PM +0200, Andreas Jaeger wrote:
> 
> I've added a patch to our regression test suite for the bug report by
> Hendrik.

If the testcase is correct, then the following patch instead of the one I
mailed earlier today will do the job.

2001-07-17  Jakub Jelinek  <jakub@redhat.com>

	* time/getdate.c (__getdate_r): Initialize tm_isdst, tm_gmtoff and
	tm_zone before calling strptime.

--- libc/time/getdate.c.jj	Fri Sep  1 11:38:27 2000
+++ libc/time/getdate.c	Tue Jul 17 17:50:50 2001
@@ -147,6 +147,9 @@ __getdate_r (const char *string, struct 
       /* Do the conversion.  */
       tp->tm_year = tp->tm_mon = tp->tm_mday = tp->tm_wday = INT_MIN;
       tp->tm_hour = tp->tm_sec = tp->tm_min = INT_MIN;
+      tp->tm_isdst = -1;
+      tp->tm_gmtoff = 0;
+      tp->tm_zone = NULL;
       result = strptime (string, line, tp);
       if (result && *result == '\0')
 	break;


	Jakub


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