git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e73d53
)
Correct thread-unsafe use of gmtime().
author
Zdeněk Salvet
<salvet@ics.muni.cz>
Tue, 24 Jan 2006 09:52:56 +0000
(09:52 +0000)
committer
Zdeněk Salvet
<salvet@ics.muni.cz>
Tue, 24 Jan 2006 09:52:56 +0000
(09:52 +0000)
org.glite.lb.common/src/ulm_parse.c
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.lb.common/src/ulm_parse.c
b/org.glite.lb.common/src/ulm_parse.c
index
2525a3e
..
855c26b
100644
(file)
--- a/
org.glite.lb.common/src/ulm_parse.c
+++ b/
org.glite.lb.common/src/ulm_parse.c
@@
-384,13
+384,14
@@
void edg_wll_ULMSplitDate( const char *s,
int edg_wll_ULMTimevalToDate( long sec, long usec, char *dstr )
{
char *func = "edg_wll_ULMTimevalToDate";
+ struct tm tms;
struct tm *tp;
int len;
if ( sec < 0 || usec < 0 || usec > 999999 )
return 1;
- tp = gmtime
( (const time_t *) &sec
);
+ tp = gmtime
_r( (const time_t *) &sec, &tms
);
if ( tp == NULL )
return 1;