]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix typo of "minite" to "minute" in rgw_lc.cc 10929/head
authorzhangweibing <zhangweibing@unitedstack.com>
Wed, 31 Aug 2016 03:21:52 +0000 (11:21 +0800)
committerzhangweibing <zhangweibing@unitedstack.com>
Wed, 31 Aug 2016 03:21:52 +0000 (11:21 +0800)
Signed-off-by: Weibing Zhang <zhangweibing@unitedstack.com>
src/rgw/rgw_lc.cc

index 8876f6330ce476c6390ebab02429fe26838a1706..e4c5ccba3d2aaf573005326fdffc4084ea8e05be 100644 (file)
@@ -497,16 +497,16 @@ bool RGWLC::going_down()
 bool RGWLC::LCWorker::should_work(utime_t& now)
 {
   int start_hour;
-  int start_minite;
+  int start_minute;
   int end_hour;
-  int end_minite;
+  int end_minute;
   string worktime = cct->_conf->rgw_lifecycle_work_time;
-  sscanf(worktime.c_str(),"%d:%d-%d:%d",&start_hour, &start_minite, &end_hour, &end_minite);
+  sscanf(worktime.c_str(),"%d:%d-%d:%d",&start_hour, &start_minute, &end_hour, &end_minute);
   struct tm bdt;
   time_t tt = now.sec();
   localtime_r(&tt, &bdt);
-  if ((bdt.tm_hour*60 + bdt.tm_min >= start_hour*60 + start_minite)||
-      (bdt.tm_hour*60 + bdt.tm_min <= end_hour*60 + end_minite)) {
+  if ((bdt.tm_hour*60 + bdt.tm_min >= start_hour*60 + start_minute)||
+      (bdt.tm_hour*60 + bdt.tm_min <= end_hour*60 + end_minute)) {
     return true;
   } else {
     return false;
@@ -517,17 +517,17 @@ bool RGWLC::LCWorker::should_work(utime_t& now)
 int RGWLC::LCWorker::shedule_next_start_time(utime_t& now)
 {
   int start_hour;
-  int start_minite;
+  int start_minute;
   int end_hour;
-  int end_minite;
+  int end_minute;
   string worktime = cct->_conf->rgw_lifecycle_work_time;
-  sscanf(worktime.c_str(),"%d:%d-%d:%d",&start_hour, &start_minite, &end_hour, &end_minite);
+  sscanf(worktime.c_str(),"%d:%d-%d:%d",&start_hour, &start_minute, &end_hour, &end_minute);
   struct tm bdt;
   time_t tt = now.sec();
   time_t nt;
   localtime_r(&tt, &bdt);
   bdt.tm_hour = start_hour;
-  bdt.tm_min = start_minite;
+  bdt.tm_min = start_minute;
   bdt.tm_sec = 0;
   nt = mktime(&bdt);
   return (nt+24*60*60 - tt);