diff options
author | Chris Watkins <chris.watkins88@gmail.com> | 2014-04-27 10:48:08 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-05-01 16:59:11 -0400 |
commit | 67a157c08d28810a9a7b460cb56b9e92d0d77e95 (patch) | |
tree | c8c5252a8be9a2d0546482b6336a215bb6f970bf /src/diff.c | |
parent | 1b5217687abf8e1aeabaf4e5a64073177d56e593 (diff) | |
download | rneovim-67a157c08d28810a9a7b460cb56b9e92d0d77e95.tar.gz rneovim-67a157c08d28810a9a7b460cb56b9e92d0d77e95.tar.bz2 rneovim-67a157c08d28810a9a7b460cb56b9e92d0d77e95.zip |
Replace 'alloc' with 'xmalloc' in some files.
Files changed: charset.c, buffer.c, diff.c, edit.c,
ex_cmds.c, ex_cmds2.c and ex_docmd.c.
The remaining alloc's in these files require more careful attention to
remove.
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/diff.c b/src/diff.c index 74e145f96c..880ae9edef 100644 --- a/src/diff.c +++ b/src/diff.c @@ -462,7 +462,7 @@ static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1, /// @return The new diff block. static diff_T* diff_alloc_new(tabpage_T *tp, diff_T *dprev, diff_T *dp) { - diff_T *dnew = (diff_T *)alloc((unsigned)sizeof(diff_T)); + diff_T *dnew = xmalloc(sizeof(*dnew)); dnew->df_next = dp; if (dprev == NULL) { @@ -819,7 +819,7 @@ static void diff_file(char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff) } else { size_t len = STRLEN(tmp_orig) + STRLEN(tmp_new) + STRLEN(tmp_diff) + STRLEN(p_srr) + 27; - char_u *cmd = alloc((unsigned)len); + char_u *cmd = xmalloc(len); /* We don't want $DIFF_OPTIONS to get in the way. */ if (os_getenv("DIFF_OPTIONS")) { @@ -895,7 +895,7 @@ void ex_diffpatch(exarg_T *eap) size_t buflen = STRLEN(tmp_orig) + (STRLEN(eap->arg)) + STRLEN(tmp_new) + 16; #endif // ifdef UNIX - buf = alloc((unsigned)buflen); + buf = xmalloc(buflen); #ifdef UNIX |