diff options
author | Josh Rahm <rahm@google.com> | 2022-10-11 19:00:52 +0000 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2022-10-11 19:00:52 +0000 |
commit | 21e2e46242033c7aaa6ccfb23e256680816c063c (patch) | |
tree | f089522cfb145d6e9c8a86a01d8e454ce5501e20 /src/nvim/hashtab.c | |
parent | 179d3ed87b17988f5fe00d8b99f2611a28212be7 (diff) | |
parent | 760b399f6c0c6470daa0663752bd22886997f9e6 (diff) | |
download | rneovim-floattitle.tar.gz rneovim-floattitle.tar.bz2 rneovim-floattitle.zip |
Merge remote-tracking branch 'upstream/master' into floattitlefloattitle
Diffstat (limited to 'src/nvim/hashtab.c')
-rw-r--r-- | src/nvim/hashtab.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/hashtab.c b/src/nvim/hashtab.c index 951e72ea52..1ebac603c2 100644 --- a/src/nvim/hashtab.c +++ b/src/nvim/hashtab.c @@ -67,7 +67,7 @@ void hash_clear(hashtab_T *ht) void hash_clear_all(hashtab_T *ht, unsigned int off) { size_t todo = ht->ht_used; - for (hashitem_T *hi = ht->ht_array; todo > 0; ++hi) { + for (hashitem_T *hi = ht->ht_array; todo > 0; hi++) { if (!HASHITEM_EMPTY(hi)) { xfree(hi->hi_key - off); todo--; @@ -87,7 +87,7 @@ void hash_clear_all(hashtab_T *ht, unsigned int off) /// is changed in any way. hashitem_T *hash_find(const hashtab_T *const ht, const char *const key) { - return hash_lookup(ht, key, STRLEN(key), hash_hash((char_u *)key)); + return hash_lookup(ht, key, strlen(key), hash_hash((char_u *)key)); } /// Like hash_find, but key is not NUL-terminated @@ -194,7 +194,7 @@ void hash_debug_results(void) #endif // ifdef HT_DEBUG } -/// Add item for key "key" to hashtable "ht". +/// Add (empty) item for key `key` to hashtable `ht`. /// /// @param key Pointer to the key for the new item. The key has to be contained /// in the new item (@see hashitem_T). Must not be NULL. @@ -265,7 +265,7 @@ void hash_unlock(hashtab_T *ht) hash_may_resize(ht, 0); } -/// Resize hastable (new size can be given or automatically computed). +/// Resize hashtable (new size can be given or automatically computed). /// /// @param minitems Minimum number of items the new table should hold. /// If zero, new size will depend on currently used items: @@ -356,7 +356,7 @@ static void hash_may_resize(hashtab_T *ht, size_t minitems) hash_T newmask = newsize - 1; size_t todo = ht->ht_used; - for (hashitem_T *olditem = oldarray; todo > 0; ++olditem) { + for (hashitem_T *olditem = oldarray; todo > 0; olditem++) { if (HASHITEM_EMPTY(olditem)) { continue; } |