mirror of
https://github.com/vim/vim.git
synced 2025-10-01 04:54:07 -04:00
patch 8.0.0544: cppcheck warnings
Problem: Cppcheck warnings. Solution: Use temp variable. Change NUL to NULL. Swap conditions. (Dominique Pelle)
This commit is contained in:
@@ -2571,9 +2571,14 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
|||||||
if (nl == NULL)
|
if (nl == NULL)
|
||||||
{
|
{
|
||||||
/* Flush remaining message that is missing a NL. */
|
/* Flush remaining message that is missing a NL. */
|
||||||
buf = vim_realloc(buf, node->rq_buflen + 1);
|
char_u *new_buf;
|
||||||
if (buf == NULL)
|
|
||||||
|
new_buf = vim_realloc(buf, node->rq_buflen + 1);
|
||||||
|
if (new_buf == NULL)
|
||||||
|
/* This might fail over and over again, should the message
|
||||||
|
* be dropped? */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
buf = new_buf;
|
||||||
node->rq_buffer = buf;
|
node->rq_buffer = buf;
|
||||||
nl = buf + node->rq_buflen++;
|
nl = buf + node->rq_buflen++;
|
||||||
*nl = NUL;
|
*nl = NUL;
|
||||||
|
@@ -9524,7 +9524,7 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
|
|||||||
#endif
|
#endif
|
||||||
buf[idx++] = c;
|
buf[idx++] = c;
|
||||||
buf[idx] = NUL;
|
buf[idx] = NUL;
|
||||||
if (end != NUL && STRNCMP(buf, end, idx) == 0)
|
if (end != NULL && STRNCMP(buf, end, idx) == 0)
|
||||||
{
|
{
|
||||||
if (end[idx] == NUL)
|
if (end[idx] == NUL)
|
||||||
break; /* Found the end of paste code. */
|
break; /* Found the end of paste code. */
|
||||||
|
@@ -1695,7 +1695,7 @@ conv_to_pvim(void)
|
|||||||
ptr[i] = toF_leading(ptr[i]);
|
ptr[i] = toF_leading(ptr[i]);
|
||||||
++i;
|
++i;
|
||||||
|
|
||||||
while (canF_Rjoin(ptr[i]) && i < llen)
|
while (i < llen && canF_Rjoin(ptr[i]))
|
||||||
{
|
{
|
||||||
ptr[i] = toF_Rjoin(ptr[i]);
|
ptr[i] = toF_Rjoin(ptr[i]);
|
||||||
if (F_isterm(ptr[i]) || !F_isalpha(ptr[i]))
|
if (F_isterm(ptr[i]) || !F_isalpha(ptr[i]))
|
||||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
544,
|
||||||
/**/
|
/**/
|
||||||
543,
|
543,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user