mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 12:08:33 +00:00
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:

committed by
Justin M. Keyes

parent
31f879983f
commit
de3e2f051e
@@ -6079,8 +6079,8 @@ void grid_alloc(ScreenGrid *grid, int rows, int columns, bool copy, bool valid)
|
|||||||
{
|
{
|
||||||
int new_row;
|
int new_row;
|
||||||
ScreenGrid new = *grid;
|
ScreenGrid new = *grid;
|
||||||
|
assert(rows >= 0 && columns >= 0);
|
||||||
size_t ncells = (size_t)((rows+1) * columns);
|
size_t ncells = (size_t)rows * columns;
|
||||||
new.chars = xmalloc(ncells * sizeof(schar_T));
|
new.chars = xmalloc(ncells * sizeof(schar_T));
|
||||||
new.attrs = xmalloc(ncells * sizeof(sattr_T));
|
new.attrs = xmalloc(ncells * sizeof(sattr_T));
|
||||||
new.line_offset = xmalloc((size_t)(rows * sizeof(unsigned)));
|
new.line_offset = xmalloc((size_t)(rows * sizeof(unsigned)));
|
||||||
|
Reference in New Issue
Block a user