Use unsigned int for comparison against array size
This commit is contained in:
parent
2a7e715423
commit
308281633d
2
db/c.cc
2
db/c.cc
@ -1502,7 +1502,7 @@ char** rocksdb_compact_files(rocksdb_t* db, rocksdb_compactfiles_options_t* opt,
|
|||||||
*output_files_len = output_files.size();
|
*output_files_len = output_files.size();
|
||||||
char** output_files_list =
|
char** output_files_list =
|
||||||
static_cast<char**>(malloc(sizeof(char*) * *output_files_len));
|
static_cast<char**>(malloc(sizeof(char*) * *output_files_len));
|
||||||
for (int i = 0; i < *output_files_len; ++i) {
|
for (unsigned int i = 0; i < *output_files_len; ++i) {
|
||||||
output_files_list[i] = strdup(output_files[i].c_str());
|
output_files_list[i] = strdup(output_files[i].c_str());
|
||||||
}
|
}
|
||||||
return output_files_list;
|
return output_files_list;
|
||||||
|
Loading…
Reference in New Issue
Block a user