Add precondition to longestCommonPrefixPartialKey
All checks were successful
Tests / Release [gcc] total: 471, passed: 471
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Reference build: <a href="https://jenkins.weaselab.dev/job/weaselab/job/conflict-set/job/main/33//gcc">weaselab » conflict-set » main #33</a>
Tests / Coverage total: 469, passed: 469
weaselab/conflict-set/pipeline/head This commit looks good
All checks were successful
Tests / Release [gcc] total: 471, passed: 471
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Reference build: <a href="https://jenkins.weaselab.dev/job/weaselab/job/conflict-set/job/main/33//gcc">weaselab » conflict-set » main #33</a>
Tests / Coverage total: 469, passed: 469
weaselab/conflict-set/pipeline/head This commit looks good
This commit is contained in:
@@ -741,6 +741,7 @@ bytes:
|
|||||||
|
|
||||||
int longestCommonPrefixPartialKey(const uint8_t *ap, const uint8_t *bp,
|
int longestCommonPrefixPartialKey(const uint8_t *ap, const uint8_t *bp,
|
||||||
int cl) {
|
int cl) {
|
||||||
|
assert(cl <= Node::kPartialKeyMaxLen);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (; i < cl; ++i) {
|
for (; i < cl; ++i) {
|
||||||
if (*ap++ != *bp++) {
|
if (*ap++ != *bp++) {
|
||||||
|
Reference in New Issue
Block a user