1
0
forked from aniani/vim

patch 8.2.0967: unnecessary type casts for vim_strnsave()

Problem:    Unnecessary type casts for vim_strnsave().
Solution:   Remove the type casts.
This commit is contained in:
Bram Moolenaar
2020-06-12 22:59:11 +02:00
parent 722e505d1a
commit 71ccd03ee8
31 changed files with 66 additions and 64 deletions

View File

@@ -680,7 +680,7 @@ mark_line(pos_T *mp, int lead_len)
if (mp->lnum == 0 || mp->lnum > curbuf->b_ml.ml_line_count)
return vim_strsave((char_u *)"-invalid-");
// Allow for up to 5 bytes per character.
s = vim_strnsave(skipwhite(ml_get(mp->lnum)), (int)Columns * 5);
s = vim_strnsave(skipwhite(ml_get(mp->lnum)), Columns * 5);
if (s == NULL)
return NULL;
// Truncate the line to fit it in the window.