diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-05-22 12:50:59 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-05-22 13:00:51 -0400 |
commit | e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72 (patch) | |
tree | 6ff1b06b5d5fd6d3260f3a778c33cfaf03f0c295 /src/nvim/screen.c | |
parent | 0aa8b5828cc0674894681841f40c3c05bfd2f07b (diff) | |
parent | e303a11ebfc352860cce73184ece692ab4d0f01c (diff) | |
download | rneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.tar.gz rneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.tar.bz2 rneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.zip |
Merge #708 'Remove NULL/non-NULL tests after vim_str(n)save'
- replace alloc with xmalloc
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index f65fa1066f..af3f5c999f 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -4691,10 +4691,7 @@ win_redr_status_matches ( if (matches == NULL) /* interrupted completion? */ return; - if (has_mbyte) - buf = alloc((unsigned)Columns * MB_MAXBYTES + 1); - else - buf = alloc((unsigned)Columns + 1); + buf = xmalloc(has_mbyte ? Columns * MB_MAXBYTES + 1 : Columns + 1); if (match == -1) { /* don't show match but original text */ match = 0; |