From 36a7408896e60adc5a7cb33be1c380d8b743899c Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Tue, 5 May 2015 08:57:34 -0700 Subject: [PATCH] Fix UNLIKELY parenthesis Summary: Ooops :) status.ok() is acutally highly likely :) Test Plan: none Reviewers: rven, yhchiang, anthony Reviewed By: anthony Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D38043 --- db/db_impl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 61f107428..a6ab4b3a1 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -3200,8 +3200,8 @@ Status DBImpl::Write(const WriteOptions& write_options, WriteBatch* my_batch) { status = ScheduleFlushes(&context); } - if (UNLIKELY(status.ok()) && - (write_controller_.IsStopped() || write_controller_.GetDelay() > 0)) { + if (UNLIKELY(status.ok() && (write_controller_.IsStopped() || + write_controller_.GetDelay() > 0))) { // If writer is stopped, we need to get it going, // so schedule flushes/compactions if (context.schedule_bg_work_) {