Skip to content

Commit

Permalink
Merge pull request google#506 from lingbin:fix_issue_505
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 420787858
  • Loading branch information
pwnall committed Jan 10, 2022
2 parents a797000 + 3ab94e7 commit 1b51a3a
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions util/coding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,6 @@ bool GetVarint64(Slice* input, uint64_t* value) {
}
}

const char* GetLengthPrefixedSlice(const char* p, const char* limit,
Slice* result) {
uint32_t len;
p = GetVarint32Ptr(p, limit, &len);
if (p == nullptr) return nullptr;
if (p + len > limit) return nullptr;
*result = Slice(p, len);
return p + len;
}

bool GetLengthPrefixedSlice(Slice* input, Slice* result) {
uint32_t len;
if (GetVarint32(input, &len) && input->size() >= len) {
Expand Down

0 comments on commit 1b51a3a

Please sign in to comment.