Remove extraneous newline from ldb stderr (#6897)
Summary: **Summary** Remove the extraneous newline when using ldb tool. For example, the subcommand list_column_families will print an empty line to stderr even if there are no errors. **Test plan** Passed make check; manually tested a few ldb subcommands. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6897 Reviewed By: pdillinger Differential Revision: D21819352 Pulled By: gg814 fbshipit-source-id: 5a16a6431bb96684fe97647f4d3ac5bf0ec7fc90
This commit is contained in:
parent
0c56fc4d66
commit
038e02d8d9
@ -124,7 +124,9 @@ int LDBCommandRunner::RunCommand(
|
|||||||
|
|
||||||
cmdObj->Run();
|
cmdObj->Run();
|
||||||
LDBCommandExecuteResult ret = cmdObj->GetExecuteState();
|
LDBCommandExecuteResult ret = cmdObj->GetExecuteState();
|
||||||
fprintf(stderr, "%s\n", ret.ToString().c_str());
|
if (!ret.ToString().empty()) {
|
||||||
|
fprintf(stderr, "%s\n", ret.ToString().c_str());
|
||||||
|
}
|
||||||
delete cmdObj;
|
delete cmdObj;
|
||||||
|
|
||||||
return ret.IsFailed() ? 1 : 0;
|
return ret.IsFailed() ? 1 : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user