Merge "fastboot: don't print anything in Status() if the input is empty"

This commit is contained in:
Tom Cherry 2020-06-10 19:03:18 +00:00 committed by Gerrit Code Review
commit 18b5965e20
1 changed files with 4 additions and 2 deletions

View File

@ -200,8 +200,10 @@ static std::string find_item(const std::string& item) {
double last_start_time;
static void Status(const std::string& message) {
static constexpr char kStatusFormat[] = "%-50s ";
fprintf(stderr, kStatusFormat, message.c_str());
if (!message.empty()) {
static constexpr char kStatusFormat[] = "%-50s ";
fprintf(stderr, kStatusFormat, message.c_str());
}
last_start_time = now();
}