Fix option settable tests

Summary: In option settable tests, bytes for pointers are not all skipped, so that they may be the same as the special character and cause false positive.

Test Plan: Run the test. Manually verify the issue is not there any more.

Reviewers: IslamAbdelRahman, andrewkr

Reviewed By: IslamAbdelRahman

Subscribers: kradhakrishnan, yiwu, yhchiang, leveldb, andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D56553
This commit is contained in:
sdong 2016-04-11 14:57:27 -07:00
parent e208575b2d
commit 63cf15bb9f

View File

@ -75,8 +75,8 @@ int NumUnsetBytes(char* start_ptr, size_t total_size,
if (*ptr == kSpecialChar) {
total_unset_bytes_base++;
}
offset = pair.first + pair.second;
}
offset = pair.first + pair.second;
}
for (char* ptr = start_ptr + offset; ptr < start_ptr + total_size; ptr++) {
if (*ptr == kSpecialChar) {