[Rocksdb] codemod NULL to nullptr in tools/*.cc

Summary: simple sed command to replace NULL in tools directory. Was missed by the previous codemod.

Test Plan: it compiles

Reviewers: emayanke

Reviewed By: emayanke

CC: leveldb

Differential Revision: https://reviews.facebook.net/D9621
main
Abhishek Kona 12 years ago
parent d0798f67f4
commit 91660e048f
  1. 2
      tools/ldb.cc
  2. 8
      tools/reduce_levels_test.cc
  3. 6
      tools/sst_dump.cc

@ -67,7 +67,7 @@ public:
}
LDBCommand* cmdObj = LDBCommand::InitFromCmdLineArgs(argc, argv);
if (cmdObj == NULL) {
if (cmdObj == nullptr) {
fprintf(stderr, "Unknown command\n");
PrintHelp(argv[0]);
exit(1);

@ -18,7 +18,7 @@ public:
ReduceLevelTest() {
dbname_ = test::TmpDir() + "/db_reduce_levels_test";
DestroyDB(dbname_, Options());
db_ = NULL;
db_ = nullptr;
}
Status OpenDB(bool create_if_missing, int levels,
@ -41,7 +41,7 @@ public:
}
Status CompactMemTable() {
if (db_ == NULL) {
if (db_ == nullptr) {
return Status::InvalidArgument("DB not opened.");
}
DBImpl* db_impl = reinterpret_cast<DBImpl*>(db_);
@ -49,9 +49,9 @@ public:
}
void CloseDB() {
if (db_ != NULL) {
if (db_ != nullptr) {
delete db_;
db_ = NULL;
db_ = nullptr;
}
}

@ -22,7 +22,7 @@ namespace leveldb {
class SstFileReader {
public:
SstFileReader(std::string file_name,
explicit SstFileReader(std::string file_name,
bool verify_checksum = false,
bool output_hex = false);
Status ReadSequential(bool print_kv, uint64_t read_num = -1);
@ -95,7 +95,7 @@ static void print_help() {
int main(int argc, char** argv) {
const char* dir_or_file = NULL;
const char* dir_or_file = nullptr;
uint64_t read_num = -1;
std::string command;
@ -121,7 +121,7 @@ int main(int argc, char** argv) {
}
}
if(dir_or_file == NULL) {
if(dir_or_file == nullptr) {
print_help();
exit(1);
}

Loading…
Cancel
Save