Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 804d880

Browse filesBrowse files
tniessenruyadorno
authored andcommitted
permission: fix data types in PrintTree
* The first argument `node` should be a const pointer. * The second argument `spaces` should not be a signed integer type. * The local variable `child` should be size_t. * The local variable `pair` in the range declaration should be a reference type to avoid copying the object. Refs: #48677 PR-URL: #48770 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent c8da8c8 commit 804d880
Copy full SHA for 804d880

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎src/permission/fs_permission.cc‎

Copy file name to clipboardExpand all lines: src/permission/fs_permission.cc
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ namespace node {
7373

7474
namespace permission {
7575

76-
void PrintTree(FSPermission::RadixTree::Node* node, int spaces = 0) {
76+
void PrintTree(const FSPermission::RadixTree::Node* node, size_t spaces = 0) {
7777
std::string whitespace(spaces, ' ');
7878

7979
if (node == nullptr) {
@@ -90,8 +90,8 @@ void PrintTree(FSPermission::RadixTree::Node* node, int spaces = 0) {
9090
whitespace,
9191
node->prefix);
9292
if (node->children.size()) {
93-
int child = 0;
94-
for (const auto pair : node->children) {
93+
size_t child = 0;
94+
for (const auto& pair : node->children) {
9595
++child;
9696
per_process::Debug(DebugCategory::PERMISSION_MODEL,
9797
"%s Child(%s): %s\n",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.