]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: fix uninitialized value
authorQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 25 Apr 2018 03:06:11 +0000 (23:06 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 29 May 2018 19:06:16 +0000 (19:06 +0000)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
zebra/zserv.c

index 55dc3d5d3e8aafddc310a93b78440d091b596f4c..4b12aefd2dc38320c91a17d0a97ba1553754860d 100644 (file)
@@ -885,7 +885,7 @@ static void zebra_show_client_detail(struct vty *vty, struct zserv *client)
 
        last_read_time = (time_t) atomic_load_explicit(&client->last_read_time,
                                                       memory_order_relaxed);
-       last_read_time = (time_t) atomic_load_explicit(&client->last_write_time,
+       last_write_time = (time_t) atomic_load_explicit(&client->last_write_time,
                                                       memory_order_relaxed);
 
        last_read_cmd = atomic_load_explicit(&client->last_read_cmd,
@@ -938,11 +938,11 @@ static void zebra_show_client_brief(struct vty *vty, struct zserv *client)
        char wbuf[ZEBRA_TIME_BUF];
        time_t connect_time, last_read_time, last_write_time;
 
-       connect_time = (time_t) atomic_load_explicit(&client->connect_time,
-                                                    memory_order_relaxed);
-       last_read_time = (time_t) atomic_load_explicit(&client->last_read_time,
-                                                      memory_order_relaxed);
-       last_read_time = (time_t) atomic_load_explicit(&client->last_write_time,
+       connect_time = (time_t)atomic_load_explicit(&client->connect_time,
+                                                   memory_order_relaxed);
+       last_read_time = (time_t)atomic_load_explicit(&client->last_read_time,
+                                                     memory_order_relaxed);
+       last_write_time = (time_t)atomic_load_explicit(&client->last_write_time,
                                                       memory_order_relaxed);
 
        vty_out(vty, "%-8s%12s %12s%12s%8d/%-8d%8d/%-8d\n",