PVS/V1028: cast operands, not the result #10498

The + 1 can be removed. It was used for current_screenline, which
now is dedicated linebuf_char buffer.
This commit is contained in:
Ihor Antonov
2019-07-15 18:55:10 -04:00
committed by Justin M. Keyes
parent 31f879983f
commit de3e2f051e

View File

@@ -6079,8 +6079,8 @@ void grid_alloc(ScreenGrid *grid, int rows, int columns, bool copy, bool valid)
{
int new_row;
ScreenGrid new = *grid;
size_t ncells = (size_t)((rows+1) * columns);
assert(rows >= 0 && columns >= 0);
size_t ncells = (size_t)rows * columns;
new.chars = xmalloc(ncells * sizeof(schar_T));
new.attrs = xmalloc(ncells * sizeof(sattr_T));
new.line_offset = xmalloc((size_t)(rows * sizeof(unsigned)));