From 3fdb6e5234022df4000edc37b1dc472f7a40b807 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Wed, 23 Sep 2015 12:39:16 -0700 Subject: [PATCH] Fixed old lint errors in db/filename.cc Summary: Fixed old lint errors in db/filename.cc Test Plan: make Reviewers: igor, sdong, anthony, IslamAbdelRahman Reviewed By: IslamAbdelRahman Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D47445 --- db/filename.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/filename.cc b/db/filename.cc index f445712e1..d06bed0dd 100644 --- a/db/filename.cc +++ b/db/filename.cc @@ -151,8 +151,9 @@ InfoLogPrefix::InfoLogPrefix(bool has_log_dir, std::string InfoLogFileName(const std::string& dbname, const std::string& db_path, const std::string& log_dir) { - if (log_dir.empty()) + if (log_dir.empty()) { return dbname + "/LOG"; + } InfoLogPrefix info_log_prefix(true, db_path); return log_dir + "/" + info_log_prefix.buf; @@ -164,8 +165,9 @@ std::string OldInfoLogFileName(const std::string& dbname, uint64_t ts, char buf[50]; snprintf(buf, sizeof(buf), "%llu", static_cast(ts)); - if (log_dir.empty()) + if (log_dir.empty()) { return dbname + "/LOG.old." + buf; + } InfoLogPrefix info_log_prefix(true, db_path); return log_dir + "/" + info_log_prefix.buf + ".old." + buf;