diff options
| author | rgirada <rgirada@vmware.com> | 2021-11-09 04:21:06 -0800 |
|---|---|---|
| committer | rgirada <rgirada@vmware.com> | 2021-11-09 04:35:12 -0800 |
| commit | 89f472acb42a07086507c9ce796dc746fdaa0c6a (patch) | |
| tree | 744e424083f406ec4e95d160035b8e1976f8814a /ospfd/ospf_vty.c | |
| parent | b6380d60c78639941192c2194269fc1c21b6db81 (diff) | |
ospfd: fixing few coverity issues in ospf_vty.c
Description:
timerval datastructure is being used without initialization.
Using these uninitialized parameters can lead unexpected results
so initializing before using it.
Signed-off-by: Rajesh Girada <rgirada@vmware.com>
Diffstat (limited to 'ospfd/ospf_vty.c')
| -rw-r--r-- | ospfd/ospf_vty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index bbb458d8ef..b02d24d597 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -4350,7 +4350,7 @@ static void show_ip_ospf_neighbor_sub(struct vty *vty, char buf[PREFIX_STRLEN]; char timebuf[OSPF_TIME_DUMP_SIZE]; json_object *json_neighbor = NULL, *json_neigh_array = NULL; - struct timeval res; + struct timeval res = {.tv_sec = 0, .tv_usec = 0}; long time_val = 0; char uptime[OSPF_TIME_DUMP_SIZE]; |
