From 20327d6516580d32cc98b58731c3d657be1aedd9 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Thu, 11 Aug 2016 11:39:11 +0800 Subject: [PATCH] osd/OSDMonitor: drop redundant null check of max_failed_since Because the "max_failed_since < failed_since" will catch both. Signed-off-by: xie xingguo --- src/mon/OSDMonitor.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mon/OSDMonitor.h b/src/mon/OSDMonitor.h index aff5b1bf83e6e..7a066699eca21 100644 --- a/src/mon/OSDMonitor.h +++ b/src/mon/OSDMonitor.h @@ -78,9 +78,7 @@ struct failure_info_t { MonOpRequestRef op) { map::iterator p = reporters.find(who); if (p == reporters.end()) { - if (max_failed_since == utime_t()) - max_failed_since = failed_since; - else if (max_failed_since < failed_since) + if (max_failed_since < failed_since) max_failed_since = failed_since; p = reporters.insert(map::value_type(who, failure_reporter_t(failed_since))).first; } -- 2.39.5