]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: use thread safe version of gmtime
authorSylvain Munaut <s.munaut@whatever-company.com>
Thu, 8 Nov 2012 20:11:59 +0000 (12:11 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Thu, 8 Nov 2012 21:13:15 +0000 (13:13 -0800)
Use gmtime_r instead of gmtime.

Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
src/rgw/rgw_rest.cc

index 3612a9e67521d0d681c52786c9886020a7a8469f..4b083aa400af895835777f029c9424c470d022aa 100644 (file)
@@ -166,7 +166,8 @@ void dump_last_modified(struct req_state *s, time_t t)
 {
 
   char timestr[TIME_BUF_SIZE];
-  struct tm *tmp = gmtime(&t);
+  struct tm result;
+  struct tm *tmp = gmtime_r(&t, &result);
   if (tmp == NULL)
     return;