]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_gr.c
ospfd: Coverity warns that we could possibly use unininted data
[mirror_frr.git] / ospfd / ospf_gr.c
index 8276ccb89cd29b2bbaf6463f2e9f005cf8c59fd3..66ef1d6564d967e5855af6cf9986860064704dae 100644 (file)
@@ -216,7 +216,7 @@ static void ospf_gr_restart_exit(struct ospf *ospf, const char *reason)
                zlog_debug("GR: exiting graceful restart: %s", reason);
 
        ospf->gr_info.restart_in_progress = false;
-       OSPF_TIMER_OFF(ospf->gr_info.t_grace_period);
+       THREAD_OFF(ospf->gr_info.t_grace_period);
 
        /* Record in non-volatile memory that the restart is complete. */
        ospf_gr_nvm_delete(ospf);
@@ -510,14 +510,12 @@ void ospf_gr_check_adjs(struct ospf *ospf)
 }
 
 /* Handling of grace period expiry. */
-static int ospf_gr_grace_period_expired(struct thread *thread)
+static void ospf_gr_grace_period_expired(struct thread *thread)
 {
        struct ospf *ospf = THREAD_ARG(thread);
 
        ospf->gr_info.t_grace_period = NULL;
        ospf_gr_restart_exit(ospf, "grace period has expired");
-
-       return 0;
 }
 
 /*
@@ -732,7 +730,7 @@ DEFPY(graceful_restart_prepare, graceful_restart_prepare_cmd,
       "Graceful Restart commands\n"
       "Prepare upcoming graceful restart\n"
       IP_STR
-      "Prepare to restart the OSPF process")
+      "Prepare to restart the OSPF process\n")
 {
        struct ospf *ospf;
        struct listnode *node;
@@ -770,7 +768,7 @@ DEFPY(graceful_restart, graceful_restart_cmd,
 }
 
 DEFPY(no_graceful_restart, no_graceful_restart_cmd,
-      "no graceful-restart [period (1-1800)]",
+      "no graceful-restart [grace-period (1-1800)]",
       NO_STR OSPF_GR_STR
       "Maximum length of the 'grace period'\n"
       "Maximum length of the 'grace period' in seconds\n")