mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 06:50:25 +00:00
Merge pull request #429 from hwchiu/fix_clang_sa
Fix some warnings by clang static analyzer
This commit is contained in:
commit
c0fee6efb6
@ -811,6 +811,7 @@ run_stop_schedule(void)
|
||||
|
||||
anykilled = 0;
|
||||
retry_nr = 0;
|
||||
n_killed = 0;
|
||||
|
||||
if (schedule == NULL) {
|
||||
do_stop(signal_nr, quietmode, &n_killed, &n_notkilled, 0);
|
||||
|
@ -177,6 +177,9 @@ csv_decode_record(csv_record_t *rec)
|
||||
field = strpbrk(curr, ",");
|
||||
}
|
||||
field = strstr(curr, "\n");
|
||||
if (!field) {
|
||||
return;
|
||||
}
|
||||
fld = malloc(sizeof(csv_field_t));
|
||||
if (field && fld) {
|
||||
fld->field = curr;
|
||||
@ -239,6 +242,10 @@ csv_encode (csv_t *csv,
|
||||
rec = malloc(sizeof(csv_record_t));
|
||||
if (!rec) {
|
||||
log_error("record malloc failed\n");
|
||||
if (!buf) {
|
||||
free(str);
|
||||
}
|
||||
va_end(list);
|
||||
return (NULL);
|
||||
}
|
||||
csv_init_record(rec);
|
||||
|
@ -2459,7 +2459,7 @@ ospf_apiserver_clients_notify_nsm_change (struct ospf_neighbor *nbr)
|
||||
{
|
||||
struct msg *msg;
|
||||
struct in_addr ifaddr = { .s_addr = 0L };
|
||||
struct in_addr nbraddr = { .s_addr = 0L };
|
||||
struct in_addr nbraddr;
|
||||
|
||||
assert (nbr);
|
||||
|
||||
|
@ -6758,7 +6758,6 @@ DEFUN (no_ip_ospf_cost,
|
||||
int ret;
|
||||
struct ospf_if_params *params;
|
||||
|
||||
ifp = vty->index;
|
||||
params = IF_DEF_PARAMS (ifp);
|
||||
|
||||
if (argc == 1)
|
||||
@ -6827,7 +6826,6 @@ DEFUN (no_ip_ospf_cost2,
|
||||
int ret;
|
||||
struct ospf_if_params *params;
|
||||
|
||||
ifp = vty->index;
|
||||
params = IF_DEF_PARAMS (ifp);
|
||||
|
||||
/* According to the semantics we are mimicking "no ip ospf cost N" is
|
||||
@ -7061,13 +7059,12 @@ DEFUN (no_ip_ospf_dead_interval,
|
||||
"Address of interface")
|
||||
{
|
||||
struct interface *ifp = vty->index;
|
||||
struct in_addr addr;
|
||||
struct in_addr addr = { .s_addr = 0L};
|
||||
int ret;
|
||||
struct ospf_if_params *params;
|
||||
struct ospf_interface *oi;
|
||||
struct route_node *rn;
|
||||
|
||||
ifp = vty->index;
|
||||
params = IF_DEF_PARAMS (ifp);
|
||||
|
||||
if (argc == 2)
|
||||
@ -7242,7 +7239,6 @@ DEFUN (no_ip_ospf_hello_interval,
|
||||
int ret;
|
||||
struct ospf_if_params *params;
|
||||
|
||||
ifp = vty->index;
|
||||
params = IF_DEF_PARAMS (ifp);
|
||||
|
||||
if (argc == 2)
|
||||
@ -7520,7 +7516,6 @@ DEFUN (no_ip_ospf_priority,
|
||||
int ret;
|
||||
struct ospf_if_params *params;
|
||||
|
||||
ifp = vty->index;
|
||||
params = IF_DEF_PARAMS (ifp);
|
||||
|
||||
if (argc == 2)
|
||||
@ -7667,7 +7662,6 @@ DEFUN (no_ip_ospf_retransmit_interval,
|
||||
struct ospf_if_params *params;
|
||||
int addr_index;
|
||||
|
||||
ifp = vty->index;
|
||||
params = IF_DEF_PARAMS (ifp);
|
||||
|
||||
if (argc >= 1)
|
||||
@ -7739,7 +7733,6 @@ DEFUN (no_ip_ospf_retransmit_interval_sec,
|
||||
struct interface *ifp = vty->index;
|
||||
struct ospf_if_params *params;
|
||||
|
||||
ifp = vty->index;
|
||||
params = IF_DEF_PARAMS (ifp);
|
||||
|
||||
UNSET_IF_PARAM (params, retransmit_interval);
|
||||
@ -7824,7 +7817,6 @@ DEFUN (no_ip_ospf_transmit_delay,
|
||||
struct ospf_if_params *params;
|
||||
int addr_index;
|
||||
|
||||
ifp = vty->index;
|
||||
params = IF_DEF_PARAMS (ifp);
|
||||
|
||||
if (argc >= 1)
|
||||
@ -7897,7 +7889,6 @@ DEFUN (no_ip_ospf_transmit_delay_sec,
|
||||
struct interface *ifp = vty->index;
|
||||
struct ospf_if_params *params;
|
||||
|
||||
ifp = vty->index;
|
||||
params = IF_DEF_PARAMS (ifp);
|
||||
|
||||
UNSET_IF_PARAM (params, transmit_delay);
|
||||
|
@ -160,8 +160,8 @@ pim_register_recv (struct interface *ifp,
|
||||
int sentRegisterStop = 0;
|
||||
struct ip *ip_hdr;
|
||||
//size_t hlen;
|
||||
struct in_addr group = { .s_addr = 0 };
|
||||
struct in_addr source = { .s_addr = 0 };
|
||||
struct in_addr group;
|
||||
struct in_addr source;
|
||||
//uint8_t *msg;
|
||||
uint32_t *bits;
|
||||
|
||||
|
@ -1519,7 +1519,7 @@ zread_ipv6_delete (struct zserv *client, u_short length, struct zebra_vrf *zvrf)
|
||||
struct stream *s;
|
||||
struct zapi_ipv6 api;
|
||||
struct in6_addr nexthop;
|
||||
union g_addr *pnexthop;
|
||||
union g_addr *pnexthop = NULL;
|
||||
unsigned long ifindex;
|
||||
struct prefix p;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user