diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-03-24 20:30:14 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-03-25 18:57:02 -0300 |
commit | ed3e9d51ac2fd2a24d244796dd9cebfe0a19bc6d (patch) | |
tree | ecb1f753dd0fad9889aca15a083c7c99c1407ba7 /src/undo.c | |
parent | 68bc6bce2923f049f84d919aea24600f18139a46 (diff) | |
download | rneovim-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/undo.c')
-rw-r--r-- | src/undo.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/undo.c b/src/undo.c index 6a2d163f61..097b224d13 100644 --- a/src/undo.c +++ b/src/undo.c @@ -81,6 +81,8 @@ #define UH_MAGIC 0x18dade /* value for uh_magic when in use */ #define UE_MAGIC 0xabc123 /* value for ue_magic when in use */ +#include <string.h> + #include "vim.h" #include "undo.h" #include "edit.h" @@ -579,7 +581,7 @@ int u_savecommon(linenr_T top, linenr_T bot, linenr_T newbot, int reload) uep = (u_entry_T *)U_ALLOC_LINE(sizeof(u_entry_T)); if (uep == NULL) goto nomem; - vim_memset(uep, 0, sizeof(u_entry_T)); + memset(uep, 0, sizeof(u_entry_T)); #ifdef U_DEBUG uep->ue_magic = UE_MAGIC; #endif @@ -919,7 +921,7 @@ static u_header_T *unserialize_uhp(FILE *fp, char_u *file_name) uhp = (u_header_T *)U_ALLOC_LINE(sizeof(u_header_T)); if (uhp == NULL) return NULL; - vim_memset(uhp, 0, sizeof(u_header_T)); + memset(uhp, 0, sizeof(u_header_T)); #ifdef U_DEBUG uhp->uh_magic = UH_MAGIC; #endif @@ -1017,7 +1019,7 @@ static u_entry_T *unserialize_uep(FILE *fp, int *error, char_u *file_name) uep = (u_entry_T *)U_ALLOC_LINE(sizeof(u_entry_T)); if (uep == NULL) return NULL; - vim_memset(uep, 0, sizeof(u_entry_T)); + memset(uep, 0, sizeof(u_entry_T)); #ifdef U_DEBUG uep->ue_magic = UE_MAGIC; #endif @@ -1031,7 +1033,7 @@ static u_entry_T *unserialize_uep(FILE *fp, int *error, char_u *file_name) *error = TRUE; return uep; } - vim_memset(array, 0, sizeof(char_u *) * uep->ue_size); + memset(array, 0, sizeof(char_u *) * uep->ue_size); } else array = NULL; uep->ue_array = array; |