aboutsummaryrefslogtreecommitdiff
path: root/src/hashtab.c
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-03-24 20:30:14 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-03-25 18:57:02 -0300
commited3e9d51ac2fd2a24d244796dd9cebfe0a19bc6d (patch)
treeecb1f753dd0fad9889aca15a083c7c99c1407ba7 /src/hashtab.c
parent68bc6bce2923f049f84d919aea24600f18139a46 (diff)
downloadrneovim-ed3e9d51ac2fd2a24d244796dd9cebfe0a19bc6d.tar.gz
rneovim-ed3e9d51ac2fd2a24d244796dd9cebfe0a19bc6d.tar.bz2
rneovim-ed3e9d51ac2fd2a24d244796dd9cebfe0a19bc6d.zip
Use memset instead of vim_memset
Ran some commands on terminal, reviewed changes, and made some manual changes too. find src | xargs perl -i -p -e "s/vim_memset/memset/g" git grep -l memset | egrep "\.c$" | xargs perl -i -p -e \ 's/(#include "vim\.h")/#include <string.h>\n\n\1/g'
Diffstat (limited to 'src/hashtab.c')
-rw-r--r--src/hashtab.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hashtab.c b/src/hashtab.c
index ed198ecc6a..8e2a6dc337 100644
--- a/src/hashtab.c
+++ b/src/hashtab.c
@@ -18,6 +18,8 @@
/// of the entries is empty to keep the lookup efficient (at the cost of extra
/// memory).
+#include <string.h>
+
#include "vim.h"
#include "hashtab.h"
#include "message.h"
@@ -35,7 +37,7 @@ static int hash_may_resize(hashtab_T *ht, int minitems);
void hash_init(hashtab_T *ht)
{
// This zeroes all "ht_" entries and all the "hi_key" in "ht_smallarray".
- vim_memset(ht, 0, sizeof(hashtab_T));
+ memset(ht, 0, sizeof(hashtab_T));
ht->ht_array = ht->ht_smallarray;
ht->ht_mask = HT_INIT_SIZE - 1;
}
@@ -356,7 +358,7 @@ static int hash_may_resize(hashtab_T *ht, int minitems)
}
oldarray = ht->ht_array;
}
- vim_memset(newarray, 0, (size_t)(sizeof(hashitem_T) * newsize));
+ memset(newarray, 0, (size_t)(sizeof(hashitem_T) * newsize));
// Move all the items from the old array to the new one, placing them in
// the right spot. The new array won't have any removed items, thus this