From a80d7e86c1f088c5b68d8e8929cc72a0d9680f76 Mon Sep 17 00:00:00 2001 From: Felipe Oliveira Carvalho Date: Thu, 8 May 2014 21:34:46 -0300 Subject: Remove NULL/non-NULL tests after calls to vim_str(n)save() --- src/nvim/mark.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nvim/mark.c') diff --git a/src/nvim/mark.c b/src/nvim/mark.c index 16d360d093..28e8421ef1 100644 --- a/src/nvim/mark.c +++ b/src/nvim/mark.c @@ -606,8 +606,7 @@ static char_u *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-"); s = vim_strnsave(skipwhite(ml_get(mp->lnum)), (int)Columns); - if (s == NULL) - return NULL; + /* Truncate the line to fit it in the window */ len = 0; for (p = s; *p != NUL; mb_ptr_adv(p)) { -- cgit