Mercurial > vim
comparison src/ex_cmds.c @ 14730:193471015e1a v8.1.0377
patch 8.1.0377: xdiff doesn't use the Vim memory allocation functions
commit https://github.com/vim/vim/commit/42335f50bc6fac444a8af74c81df8369d722a6fb
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 13 15:33:43 2018 +0200
patch 8.1.0377: xdiff doesn't use the Vim memory allocation functions
Problem: Xdiff doesn't use the Vim memory allocation functions.
Solution: Change the xdl_ defines. Check for out-of-memory. Rename
"ignored" to "vim_ignored".
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 13 Sep 2018 15:45:05 +0200 |
parents | c8f07e8b273e |
children | 3d0b6e2a3a01 |
comparison
equal
deleted
inserted
replaced
14729:7cb784c3b08f | 14730:193471015e1a |
---|---|
2115 if (mch_stat((char *)tempname, &tmp_st) >= 0) | 2115 if (mch_stat((char *)tempname, &tmp_st) >= 0) |
2116 { | 2116 { |
2117 if (st_old.st_uid != tmp_st.st_uid) | 2117 if (st_old.st_uid != tmp_st.st_uid) |
2118 /* Changing the owner might fail, in which case the | 2118 /* Changing the owner might fail, in which case the |
2119 * file will now owned by the current user, oh well. */ | 2119 * file will now owned by the current user, oh well. */ |
2120 ignored = fchown(fileno(fp_out), st_old.st_uid, -1); | 2120 vim_ignored = fchown(fileno(fp_out), st_old.st_uid, -1); |
2121 if (st_old.st_gid != tmp_st.st_gid | 2121 if (st_old.st_gid != tmp_st.st_gid |
2122 && fchown(fileno(fp_out), -1, st_old.st_gid) == -1) | 2122 && fchown(fileno(fp_out), -1, st_old.st_gid) == -1) |
2123 /* can't set the group to what it should be, remove | 2123 /* can't set the group to what it should be, remove |
2124 * group permissions */ | 2124 * group permissions */ |
2125 (void)mch_setperm(tempname, 0600); | 2125 (void)mch_setperm(tempname, 0600); |