aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/util
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2017-08-01 12:40:42 -0700
committerPieter Wuille <[email protected]>2017-08-01 12:40:42 -0700
commit47f3e8c74d390139967cc40e37cf5b433f0b0f9f (patch)
treef43c285be47ec5bc66a25a7fa1c072d2cd32dc97 /src/leveldb/util
parentMerge #10788: [RPC] Fix addwitnessaddress by replacing ismine with producesig... (diff)
parentSquashed 'src/leveldb/' changes from 196962ff0..c521b3ac6 (diff)
downloaddiscoin-47f3e8c74d390139967cc40e37cf5b433f0b0f9f.tar.xz
discoin-47f3e8c74d390139967cc40e37cf5b433f0b0f9f.zip
Update LevelDB with latest Bitcoin-specific patches
Diffstat (limited to 'src/leveldb/util')
-rw-r--r--src/leveldb/util/crc32c.cc4
-rw-r--r--src/leveldb/util/logging.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/leveldb/util/crc32c.cc b/src/leveldb/util/crc32c.cc
index edd61cfd6..b3f40eeee 100644
--- a/src/leveldb/util/crc32c.cc
+++ b/src/leveldb/util/crc32c.cc
@@ -288,6 +288,10 @@ static inline uint32_t LE_LOAD32(const uint8_t *p) {
// Determine if the CPU running this program can accelerate the CRC32C
// calculation.
static bool CanAccelerateCRC32C() {
+ if (!port::HasAcceleratedCRC32C())
+ return false;
+
+ // Double-check that the accelerated implementation functions correctly.
// port::AcceleretedCRC32C returns zero when unable to accelerate.
static const char kTestCRCBuffer[] = "TestCRCBuffer";
static const char kBufSize = sizeof(kTestCRCBuffer) - 1;
diff --git a/src/leveldb/util/logging.cc b/src/leveldb/util/logging.cc
index ca6b32440..db6160c8f 100644
--- a/src/leveldb/util/logging.cc
+++ b/src/leveldb/util/logging.cc
@@ -49,7 +49,7 @@ bool ConsumeDecimalNumber(Slice* in, uint64_t* val) {
uint64_t v = 0;
int digits = 0;
while (!in->empty()) {
- char c = (*in)[0];
+ unsigned char c = (*in)[0];
if (c >= '0' && c <= '9') {
++digits;
const int delta = (c - '0');