mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 19:48:32 +00:00
Remove OOM checks: suggested changes in review
- Replace a vim_strsave/free pair with xrealloc - Use xmallocz() in some places - Use xrealloc() and forget about the NULL pointer case - Remove invalid comment - Remove unnecessary checks - Replace a complicated xmalloc/STRCPY/free code chunk code with xrealloc() - Replace a vim_strsave/free code chunk with xrealloc()
This commit is contained in:
@@ -4691,10 +4691,7 @@ win_redr_status_matches (
|
||||
if (matches == NULL) /* interrupted completion? */
|
||||
return;
|
||||
|
||||
if (has_mbyte)
|
||||
buf = xmalloc(Columns * MB_MAXBYTES + 1);
|
||||
else
|
||||
buf = xmalloc(Columns + 1);
|
||||
buf = xmalloc(has_mbyte ? Columns * MB_MAXBYTES + 1 : Columns + 1);
|
||||
|
||||
if (match == -1) { /* don't show match but original text */
|
||||
match = 0;
|
||||
|
Reference in New Issue
Block a user