]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: change the format of the cast 31393/head
authorjiahuizeng <jhzeng93@foxmail.com>
Mon, 30 Dec 2019 11:25:36 +0000 (11:25 +0000)
committerjiahuizeng <jhzeng93@foxmail.com>
Fri, 31 Jan 2020 12:00:49 +0000 (12:00 +0000)
Signed-off-by: jiahuizeng <jhzeng93@foxmail.com>
src/rgw/rgw_lc.cc

index 5c7bc2def968fa0577ac8b1d68d8a44fe288d253..be0b642a83da72ee799b5cb0cb7171c29f12ab99 100644 (file)
@@ -308,11 +308,11 @@ static bool obj_has_expired(CephContext *cct, ceph::real_time mtime, int days, c
   utime_t base_time;
   if (cct->_conf->rgw_lc_debug_interval <= 0) {
     /* Normal case, run properly */
-    cmp = (double)days*24*60*60;
+    cmp = double(days)*24*60*60;
     base_time = ceph_clock_now().round_to_day();
   } else {
     /* We're in debug mode; Treat each rgw_lc_debug_interval seconds as a day */
-    cmp = (double)days*cct->_conf->rgw_lc_debug_interval;
+    cmp = double(days)*cct->_conf->rgw_lc_debug_interval;
     base_time = ceph_clock_now();
   }
   timediff = base_time - ceph::real_clock::to_time_t(mtime);
@@ -1656,7 +1656,7 @@ std::string s3_expiration_header(
       if (rule_expiration.has_days()) {
        rule_expiration_date =
          boost::optional<ceph::real_time>(
-           mtime + make_timespan((double)rule_expiration.get_days()*24*60*60 - ceph::real_clock::to_time_t(mtime)%(24*60*60) + 24*60*60));
+           mtime + make_timespan(double(rule_expiration.get_days())*24*60*60 - ceph::real_clock::to_time_t(mtime)%(24*60*60) + 24*60*60));
       }
     }