From c3998a62f5e8425934d166daf99c84b88a5cd039 Mon Sep 17 00:00:00 2001 From: zhangweibing Date: Wed, 31 Aug 2016 11:21:52 +0800 Subject: [PATCH] rgw: fix typo of "minite" to "minute" in rgw_lc.cc Signed-off-by: Weibing Zhang --- src/rgw/rgw_lc.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 8876f6330ce..e4c5ccba3d2 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -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); -- 2.39.5