mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 02:46:31 +00:00
PVS/V1028: cast operands, not the result #10505
This commit is contained in:

committed by
Justin M. Keyes

parent
1eea2d236f
commit
f31f2d0b22
@@ -2606,8 +2606,9 @@ static void op_yank_reg(oparg_T *oap, bool message, yankreg_T *reg, bool append)
|
|||||||
|
|
||||||
static void yank_copy_line(yankreg_T *reg, struct block_def *bd, size_t y_idx)
|
static void yank_copy_line(yankreg_T *reg, struct block_def *bd, size_t y_idx)
|
||||||
{
|
{
|
||||||
char_u *pnew = xmallocz((size_t)(bd->startspaces + bd->endspaces
|
int size = bd->startspaces + bd->endspaces + bd->textlen;
|
||||||
+ bd->textlen));
|
assert(size >= 0);
|
||||||
|
char_u *pnew = xmallocz((size_t)size);
|
||||||
reg->y_array[y_idx] = pnew;
|
reg->y_array[y_idx] = pnew;
|
||||||
memset(pnew, ' ', (size_t)bd->startspaces);
|
memset(pnew, ' ', (size_t)bd->startspaces);
|
||||||
pnew += bd->startspaces;
|
pnew += bd->startspaces;
|
||||||
|
Reference in New Issue
Block a user