Skip to content

Commit

Permalink
Update hashmap_get.c
Browse files Browse the repository at this point in the history
  • Loading branch information
liuq19 committed Jun 29, 2023
1 parent a05f294 commit 43f220a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion native/hashmap_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int64_t field_hashmap_get(FieldHashMap *fmap, const GoString* key){
while (fmap->bucket[index].hash != 0) {
if(fmap->bucket[index].hash == hash \
&& fmap->bucket[index].name.len == key->len \
&& memcmp(fmap->bucket[index].name.buf, key->buf, key->len) == 0){ // memcmp 返回值是0 时才说明字符串相等
&& memcmp(fmap->bucket[index].name.buf, key->buf, key->len) == 0){
return fmap->bucket[index].id;
} else {
index = (index + 1) % fmap->N;
Expand Down

0 comments on commit 43f220a

Please sign in to comment.