trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1215555 - in /trafficserver/traffic/trunk/mgmt: cli/ConfigCmd.cc tools/SysAPI.cc
Date Sat, 17 Dec 2011 18:53:59 GMT
Author: zwoop
Date: Sat Dec 17 18:53:59 2011
New Revision: 1215555

URL: http://svn.apache.org/viewvc?rev=1215555&view=rev
Log:
TS-992 Cast localtime argument to const time_t.

Author: Piotr Sikora
Review: Leif

Modified:
    trafficserver/traffic/trunk/mgmt/cli/ConfigCmd.cc
    trafficserver/traffic/trunk/mgmt/tools/SysAPI.cc

Modified: trafficserver/traffic/trunk/mgmt/cli/ConfigCmd.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/cli/ConfigCmd.cc?rev=1215555&r1=1215554&r2=1215555&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/cli/ConfigCmd.cc (original)
+++ trafficserver/traffic/trunk/mgmt/cli/ConfigCmd.cc Sat Dec 17 18:53:59 2011
@@ -2642,7 +2642,7 @@ ConfigDate(char *datestr)
       return CLI_ERROR;
     }
 
-    mPtr = localtime(&(v.tv_sec));
+    mPtr = localtime(const_cast<const time_t *>(&(v.tv_sec)));
 
     mPtr->tm_mday = dd;
     mPtr->tm_mon = mm - 1;
@@ -2726,7 +2726,7 @@ ConfigTime(char *timestr)
       return CLI_ERROR;
     }
 
-    mPtr = localtime(&(v.tv_sec));
+    mPtr = localtime(const_cast<const time_t *>(&(v.tv_sec)));
 
     mPtr->tm_sec = sec;
     mPtr->tm_min = min;

Modified: trafficserver/traffic/trunk/mgmt/tools/SysAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/tools/SysAPI.cc?rev=1215555&r1=1215554&r2=1215555&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/tools/SysAPI.cc (original)
+++ trafficserver/traffic/trunk/mgmt/tools/SysAPI.cc Sat Dec 17 18:53:59 2011
@@ -648,7 +648,7 @@ Time_GetTime(char *hour, const size_t ho
   if (status != 0) {
     return status;
   }
-  my_tm = localtime(&(tv.tv_sec));
+  my_tm = localtime(const_cast<const time_t *>(&(tv.tv_sec)));
 
   snprintf(hour, hourSize, "%d", my_tm->tm_hour);
   snprintf(minute, minuteSize, "%d", my_tm->tm_min);
@@ -688,7 +688,7 @@ Time_GetDate(char *month, const size_t m
   if (status != 0) {
     return status;
   }
-  my_tm = localtime(&(tv.tv_sec));
+  my_tm = localtime(const_cast<time_t *>(&(tv.tv_sec)));
 
   snprintf(month, monthSize, "%d", my_tm->tm_mon + 1);
   snprintf(day, daySize, "%d", my_tm->tm_mday);



Mime
View raw message