Browse Source

test: make totalLen snake case

For consistency, use snake case (total_len) for the local totalLen
variable.

PR-URL: https://github.com/nodejs/node/pull/14765
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
v6
Daniel Bevenius 7 years ago
committed by Anna Henningsen
parent
commit
d94e4b8e81
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 6
      test/cctest/node_test_fixture.h

6
test/cctest/node_test_fixture.h

@ -36,12 +36,12 @@ struct Argv {
Argv(const std::initializer_list<const char*> &args) {
nr_args_ = args.size();
int totalLen = 0;
int total_len = 0;
for (auto it = args.begin(); it != args.end(); ++it) {
totalLen += strlen(*it) + 1;
total_len += strlen(*it) + 1;
}
argv_ = static_cast<char**>(malloc(nr_args_ * sizeof(char*)));
argv_[0] = static_cast<char*>(malloc(totalLen));
argv_[0] = static_cast<char*>(malloc(total_len));
int i = 0;
int offset = 0;
for (auto it = args.begin(); it != args.end(); ++it, ++i) {

Loading…
Cancel
Save