@@ -56,7 +56,7 @@ bool is_tree_granted(node::permission::FSPermission::RadixTree* granted_tree,
56
56
// is UNC file path
57
57
if (param.rfind (" \\\\ " , 0 ) == 0 ) {
58
58
// return lookup with normalized param
59
- int starting_pos = 4 ; // "\\?\"
59
+ size_t starting_pos = 4 ; // "\\?\"
60
60
if (param.rfind (" \\\\ ?\\ UNC\\ " ) == 0 ) {
61
61
starting_pos += 4 ; // "UNC\"
62
62
}
@@ -176,7 +176,7 @@ bool FSPermission::RadixTree::Lookup(const std::string_view& s,
176
176
if (current_node->children .size () == 0 ) {
177
177
return when_empty_return;
178
178
}
179
- unsigned int parent_node_prefix_len = current_node->prefix .length ();
179
+ size_t parent_node_prefix_len = current_node->prefix .length ();
180
180
const std::string path (s);
181
181
auto path_len = path.length ();
182
182
@@ -202,10 +202,10 @@ bool FSPermission::RadixTree::Lookup(const std::string_view& s,
202
202
void FSPermission::RadixTree::Insert (const std::string& path) {
203
203
FSPermission::RadixTree::Node* current_node = root_node_;
204
204
205
- unsigned int parent_node_prefix_len = current_node->prefix .length ();
206
- int path_len = path.length ();
205
+ size_t parent_node_prefix_len = current_node->prefix .length ();
206
+ size_t path_len = path.length ();
207
207
208
- for (int i = 1 ; i <= path_len; ++i) {
208
+ for (size_t i = 1 ; i <= path_len; ++i) {
209
209
bool is_wildcard_node = path[i - 1 ] == ' *' ;
210
210
bool is_last_char = i == path_len;
211
211
0 commit comments