fix wrong length in snprintf

Summary: Closes https://github.com/facebook/rocksdb/pull/3622

Differential Revision: D7307689

Pulled By: ajkr

fbshipit-source-id: b8f52effc63fea06c2058b39c60944c2c1f814b4
main
zhsj 7 years ago committed by Facebook Github Bot
parent ecfca1ff59
commit cc340268e9
  1. 2
      db/db_compaction_filter_test.cc

@ -109,7 +109,7 @@ class SkipEvenFilter : public CompactionFilter {
int i = std::stoi(key.ToString());
if (i / 10 % 2 == 0) {
char key_str[100];
snprintf(key_str, sizeof(key), "%010d", i / 10 * 10 + 10);
snprintf(key_str, sizeof(key_str), "%010d", i / 10 * 10 + 10);
*skip_until = key_str;
++cfilter_skips;
return Decision::kRemoveAndSkipUntil;

Loading…
Cancel
Save