diff src/screen.c @ 16782:fc58fee685e2 v8.1.1393

patch 8.1.1393: unnecessary type casts commit https://github.com/vim/vim/commit/51e14387f120392b74b84408cafec33942337a05 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 25 20:21:28 2019 +0200 patch 8.1.1393: unnecessary type casts Problem: Unnecessary type casts. Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)
author Bram Moolenaar <Bram@vim.org>
date Sat, 25 May 2019 20:30:06 +0200
parents eda4d65f232c
children f7268ec2c889
line wrap: on
line diff
--- a/src/screen.c
+++ b/src/screen.c
@@ -328,30 +328,27 @@ redraw_asap(int type)
 
     /* Allocate space to save the text displayed in the command line area. */
     rows = screen_Rows - cmdline_row;
-    screenline = (schar_T *)lalloc(
-			   (long_u)(rows * cols * sizeof(schar_T)), FALSE);
-    screenattr = (sattr_T *)lalloc(
-			   (long_u)(rows * cols * sizeof(sattr_T)), FALSE);
+    screenline = (schar_T *)lalloc(rows * cols * sizeof(schar_T), FALSE);
+    screenattr = (sattr_T *)lalloc(rows * cols * sizeof(sattr_T), FALSE);
     if (screenline == NULL || screenattr == NULL)
 	ret = 2;
     if (enc_utf8)
     {
 	screenlineUC = (u8char_T *)lalloc(
-			  (long_u)(rows * cols * sizeof(u8char_T)), FALSE);
+				       rows * cols * sizeof(u8char_T), FALSE);
 	if (screenlineUC == NULL)
 	    ret = 2;
 	for (i = 0; i < p_mco; ++i)
 	{
 	    screenlineC[i] = (u8char_T *)lalloc(
-			  (long_u)(rows * cols * sizeof(u8char_T)), FALSE);
+				       rows * cols * sizeof(u8char_T), FALSE);
 	    if (screenlineC[i] == NULL)
 		ret = 2;
 	}
     }
     if (enc_dbcs == DBCS_JPNU)
     {
-	screenline2 = (schar_T *)lalloc(
-			   (long_u)(rows * cols * sizeof(schar_T)), FALSE);
+	screenline2 = (schar_T *)lalloc(rows * cols * sizeof(schar_T), FALSE);
 	if (screenline2 == NULL)
 	    ret = 2;
     }