You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@hyperreal.org on 2000/01/18 00:23:48 UTC
cvs commit: apache-2.0/src/lib/apr/time/unix timestr.c
stoddard 00/01/17 15:23:48
Modified: src/lib/apr/time/unix timestr.c
Log:
Initialize struct tm
Submitted by: Paul Reder
Revision Changes Path
1.6 +1 -1 apache-2.0/src/lib/apr/time/unix/timestr.c
Index: timestr.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/timestr.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- timestr.c 2000/01/09 05:18:21 1.5
+++ timestr.c 2000/01/17 23:23:46 1.6
@@ -159,7 +159,7 @@
const char *format, ap_exploded_time_t *xt)
{
struct tm tm;
-
+ memset(&tm, 0, sizeof(struct tm));
tm.tm_sec = xt->tm_sec;
tm.tm_min = xt->tm_min;
tm.tm_hour = xt->tm_hour;
Re: cvs commit: apache-2.0/src/lib/apr/time/unix timestr.c
Posted by Ben Laurie <be...@algroup.co.uk>.
stoddard@hyperreal.org wrote:
>
> stoddard 00/01/17 15:23:48
>
> Modified: src/lib/apr/time/unix timestr.c
> Log:
> Initialize struct tm
> Submitted by: Paul Reder
>
> + memset(&tm, 0, sizeof(struct tm));
Y'know, memset(&tm, 0, sizeof tm); has always struck me as more correct
and less prone to coming back and biting you later...
Cheers,
Ben.
--
SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
Re: cvs commit: apache-2.0/src/lib/apr/time/unix timestr.c
Posted by Ben Laurie <be...@algroup.co.uk>.
stoddard@hyperreal.org wrote:
>
> stoddard 00/01/17 15:23:48
>
> Modified: src/lib/apr/time/unix timestr.c
> Log:
> Initialize struct tm
> Submitted by: Paul Reder
>
> + memset(&tm, 0, sizeof(struct tm));
Y'know, memset(&tm, 0, sizeof tm); has always struck me as more correct
and less prone to coming back and biting you later...
Cheers,
Ben.
--
SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi