aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/util/bloom_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/leveldb/util/bloom_test.cc')
-rw-r--r--src/leveldb/util/bloom_test.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/leveldb/util/bloom_test.cc b/src/leveldb/util/bloom_test.cc
index 4a6ea1b7c8..0bf8e8d6eb 100644
--- a/src/leveldb/util/bloom_test.cc
+++ b/src/leveldb/util/bloom_test.cc
@@ -4,6 +4,7 @@
#include "leveldb/filter_policy.h"
+#include "util/coding.h"
#include "util/logging.h"
#include "util/testharness.h"
#include "util/testutil.h"
@@ -13,8 +14,8 @@ namespace leveldb {
static const int kVerbose = 1;
static Slice Key(int i, char* buffer) {
- memcpy(buffer, &i, sizeof(i));
- return Slice(buffer, sizeof(i));
+ EncodeFixed32(buffer, i);
+ return Slice(buffer, sizeof(uint32_t));
}
class BloomTest {