mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 18:48:31 +00:00
Merge pull request #2492 from pacovn/cppcheck_security1
eigrpd, lib, tests, vtysh: security (cppcheck)
This commit is contained in:
commit
aa13697bb0
@ -757,7 +757,6 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
|
|||||||
prefixes = nbr->nbr_gr_prefixes_send;
|
prefixes = nbr->nbr_gr_prefixes_send;
|
||||||
|
|
||||||
send_prefixes = 0;
|
send_prefixes = 0;
|
||||||
length = EIGRP_HEADER_LEN;
|
|
||||||
|
|
||||||
/* if there already were last packet chunk, we won't continue */
|
/* if there already were last packet chunk, we won't continue */
|
||||||
if (nbr->nbr_gr_packet_type == EIGRP_PACKET_PART_LAST)
|
if (nbr->nbr_gr_packet_type == EIGRP_PACKET_PART_LAST)
|
||||||
|
@ -174,9 +174,10 @@ int funcname_frrzmq_thread_add_read(struct thread_master *master,
|
|||||||
cb = *cbp;
|
cb = *cbp;
|
||||||
else {
|
else {
|
||||||
cb = XCALLOC(MTYPE_ZEROMQ_CB, sizeof(struct frrzmq_cb));
|
cb = XCALLOC(MTYPE_ZEROMQ_CB, sizeof(struct frrzmq_cb));
|
||||||
cb->write.cancelled = 1;
|
|
||||||
if (!cb)
|
if (!cb)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
cb->write.cancelled = 1;
|
||||||
*cbp = cb;
|
*cbp = cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -282,9 +283,10 @@ int funcname_frrzmq_thread_add_write(struct thread_master *master,
|
|||||||
cb = *cbp;
|
cb = *cbp;
|
||||||
else {
|
else {
|
||||||
cb = XCALLOC(MTYPE_ZEROMQ_CB, sizeof(struct frrzmq_cb));
|
cb = XCALLOC(MTYPE_ZEROMQ_CB, sizeof(struct frrzmq_cb));
|
||||||
cb->read.cancelled = 1;
|
|
||||||
if (!cb)
|
if (!cb)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
cb->read.cancelled = 1;
|
||||||
*cbp = cb;
|
*cbp = cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,9 +104,7 @@ static unsigned int log_key(void *data)
|
|||||||
|
|
||||||
static int log_cmp(const void *a, const void *b)
|
static int log_cmp(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
if (a == NULL && b != NULL)
|
if (a == NULL || b == NULL)
|
||||||
return 0;
|
|
||||||
if (b == NULL && a != NULL)
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return !memcmp(a, b, 2 * sizeof(struct prefix));
|
return !memcmp(a, b, 2 * sizeof(struct prefix));
|
||||||
|
@ -816,7 +816,7 @@ int vtysh_mark_file(const char *filename)
|
|||||||
vty_out(vty, "%s", vty->buf);
|
vty_out(vty, "%s", vty->buf);
|
||||||
break;
|
break;
|
||||||
case CMD_SUCCESS_DAEMON: {
|
case CMD_SUCCESS_DAEMON: {
|
||||||
int cmd_stat = CMD_SUCCESS;
|
int cmd_stat;
|
||||||
|
|
||||||
vty_out(vty, "%s", vty->buf);
|
vty_out(vty, "%s", vty->buf);
|
||||||
cmd_stat = vtysh_client_execute(&vtysh_client[0],
|
cmd_stat = vtysh_client_execute(&vtysh_client[0],
|
||||||
|
Loading…
Reference in New Issue
Block a user