Commit 476c6b7c authored by Chris Blume's avatar Chris Blume Committed by Commit Bot

Use nullptr instead of 0 in zlib_bench pointers

A recently CL had a clang-tidy bot call out using a 0 instead of
a nullptr for pointers. But the change in that CL wasn't the only
location where this was happening.

This CL updates all the 0-as-pointer locations in zlib_bench.

Change-Id: I7b9b0576431fb32974085046ca9174b527f08b7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2149908Reviewed-by: default avatarAdenilson Cavalcanti <cavalcantii@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759154}
parent f1e8f022
......@@ -38,7 +38,7 @@ void error_exit(const char* error, int code) {
}
inline char* string_data(std::string* s) {
return s->empty() ? 0 : &*s->begin();
return s->empty() ? nullptr : &*s->begin();
}
struct Data {
......@@ -99,7 +99,7 @@ const char* zlib_wrapper_name(zlib_wrapper type) {
if (type == kWrapperZRAW)
return "RAW";
error_exit("bad wrapper type", int(type));
return 0;
return nullptr;
}
static int zlib_strategy = Z_DEFAULT_STRATEGY;
......@@ -114,7 +114,7 @@ const char* zlib_level_strategy_name(int compression_level) {
if (zlib_strategy == Z_DEFAULT_STRATEGY)
return "";
error_exit("bad strategy", zlib_strategy);
return 0;
return nullptr;
}
static int zlib_compression_level = Z_DEFAULT_COMPRESSION;
......@@ -296,8 +296,8 @@ static int argn = 1;
char* get_option(int argc, char* argv[], const char* option) {
if (argn < argc)
return !strcmp(argv[argn], option) ? argv[argn++] : 0;
return 0;
return !strcmp(argv[argn], option) ? argv[argn++] : nullptr;
return nullptr;
}
bool get_compression(int argc, char* argv[], int* value) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment