Skip to content

Commit

Permalink
avoid c++11 nullptr and use 0 on null comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecosta90 committed Sep 20, 2023
1 parent bec3471 commit d06d9ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions memtier_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ static int config_parse_args(int argc, char *argv[], struct benchmark_config *cf
{
const char tls_delimiter = ',';
char* tls_token = strtok(optarg, &tls_delimiter);
while (tls_token != nullptr) {
while (tls_token != 0) {
if (!strcasecmp(tls_token, "tlsv1"))
cfg->tls_protocols |= REDIS_TLS_PROTO_TLSv1;
else if (!strcasecmp(tls_token, "tlsv1.1"))
Expand All @@ -904,7 +904,7 @@ static int config_parse_args(int argc, char *argv[], struct benchmark_config *cf
return -1;
break;
}
tls_token = strtok(nullptr, &tls_delimiter);
tls_token = strtok(0, &tls_delimiter);
}
break;
}
Expand Down

0 comments on commit d06d9ab

Please sign in to comment.