Use unsigned int for comparison against array size

This commit is contained in:
Peter Chen 2021-02-08 21:48:58 -08:00
parent 2a7e715423
commit 308281633d

View File

@ -1502,7 +1502,7 @@ char** rocksdb_compact_files(rocksdb_t* db, rocksdb_compactfiles_options_t* opt,
*output_files_len = output_files.size();
char** output_files_list =
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());
}
return output_files_list;