]> git.puffer.fish Git - mirror/frr.git/commitdiff
*: remove useless return variables
authorQuentin Young <qlyoung@cumulusnetworks.com>
Mon, 25 Feb 2019 18:59:55 +0000 (18:59 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Mon, 25 Feb 2019 23:00:16 +0000 (23:00 +0000)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
eigrpd/eigrp_hello.c
eigrpd/eigrp_vty.c
isisd/isis_pdu.c
ospfd/ospf_ism.c
zebra/zebra_dplane.c
zebra/zebra_rib.c

index b4d850be086f2da137b54a644f5f0ed090ee7d47..dacd5caeb51f4a48f752325e91c1949240bca1bc 100644 (file)
@@ -577,8 +577,6 @@ static uint16_t eigrp_next_sequence_encode(struct stream *s)
 static uint16_t eigrp_hello_parameter_encode(struct eigrp_interface *ei,
                                             struct stream *s, uint8_t flags)
 {
-       uint16_t length = EIGRP_TLV_PARAMETER_LEN;
-
        // add in the parameters TLV
        stream_putw(s, EIGRP_TLV_PARAMETER);
        stream_putw(s, EIGRP_TLV_PARAMETER_LEN);
@@ -605,7 +603,7 @@ static uint16_t eigrp_hello_parameter_encode(struct eigrp_interface *ei,
        // and set hold time value..
        stream_putw(s, ei->params.v_wait);
 
-       return length;
+       return EIGRP_TLV_PARAMETER_LEN;
 }
 
 /**
index a9b103de471629eaac79f248942db51089cc62e8..fc5bdbdbc5f5214c0545138340c3afeaaa4928c9 100644 (file)
@@ -1499,8 +1499,6 @@ static int eigrp_config_write(struct vty *vty)
 {
        struct eigrp *eigrp;
 
-       int write = 0;
-
        eigrp = eigrp_lookup();
        if (eigrp != NULL) {
                /* Writes 'router eigrp' section to config */
@@ -1525,7 +1523,7 @@ static int eigrp_config_write(struct vty *vty)
                //      config_write_eigrp_distance (vty, eigrp)
        }
 
-       return write;
+       return 0;
 }
 
 void eigrp_vty_show_init(void)
index af35ed2e3c7e203b353061a887a088ce8d32bb06..107de47f3db70803615754966c8d9e28c942dc91 100644 (file)
@@ -2164,7 +2164,6 @@ int send_csnp(struct isis_circuit *circuit, int level)
 int send_l1_csnp(struct thread *thread)
 {
        struct isis_circuit *circuit;
-       int retval = ISIS_OK;
 
        circuit = THREAD_ARG(thread);
        assert(circuit);
@@ -2181,13 +2180,12 @@ int send_l1_csnp(struct thread *thread)
                         isis_jitter(circuit->csnp_interval[0], CSNP_JITTER),
                         &circuit->t_send_csnp[0]);
 
-       return retval;
+       return ISIS_OK;
 }
 
 int send_l2_csnp(struct thread *thread)
 {
        struct isis_circuit *circuit;
-       int retval = ISIS_OK;
 
        circuit = THREAD_ARG(thread);
        assert(circuit);
@@ -2204,7 +2202,7 @@ int send_l2_csnp(struct thread *thread)
                         isis_jitter(circuit->csnp_interval[1], CSNP_JITTER),
                         &circuit->t_send_csnp[1]);
 
-       return retval;
+       return ISIS_OK;
 }
 
 /*
@@ -2329,7 +2327,6 @@ int send_l1_psnp(struct thread *thread)
 {
 
        struct isis_circuit *circuit;
-       int retval = ISIS_OK;
 
        circuit = THREAD_ARG(thread);
        assert(circuit);
@@ -2342,7 +2339,7 @@ int send_l1_psnp(struct thread *thread)
                         isis_jitter(circuit->psnp_interval[0], PSNP_JITTER),
                         &circuit->t_send_psnp[0]);
 
-       return retval;
+       return ISIS_OK;
 }
 
 /*
@@ -2352,7 +2349,6 @@ int send_l1_psnp(struct thread *thread)
 int send_l2_psnp(struct thread *thread)
 {
        struct isis_circuit *circuit;
-       int retval = ISIS_OK;
 
        circuit = THREAD_ARG(thread);
        assert(circuit);
@@ -2366,7 +2362,7 @@ int send_l2_psnp(struct thread *thread)
                         isis_jitter(circuit->psnp_interval[1], PSNP_JITTER),
                         &circuit->t_send_psnp[1]);
 
-       return retval;
+       return ISIS_OK;
 }
 
 /*
index 9fd9a70c78e9e0300eb0cddcebf50c9dac82883c..419081fe592d410cd2ccab4e071cc5f575d03a2d 100644 (file)
@@ -380,12 +380,10 @@ static int ism_interface_up(struct ospf_interface *oi)
 
 static int ism_loop_ind(struct ospf_interface *oi)
 {
-       int ret = 0;
-
        /* call ism_interface_down. */
        /* ret = ism_interface_down (oi); */
 
-       return ret;
+       return 0;
 }
 
 /* Interface down event handler. */
index 928169a86267914e930b58b0d51cfbf5fa178b17..9aab9ea8560298ff7ec8d3d5806bbecd9f06f21e 100644 (file)
@@ -1039,8 +1039,6 @@ static int dplane_ctx_pw_init(struct zebra_dplane_ctx *ctx,
                              enum dplane_op_e op,
                              struct zebra_pw *pw)
 {
-       int ret = AOK;
-
        if (IS_ZEBRA_DEBUG_DPLANE_DETAIL)
                zlog_debug("init dplane ctx %s: pw '%s', loc %u, rem %u",
                           dplane_op2str(op), pw->ifname, pw->local_label,
@@ -1070,7 +1068,7 @@ static int dplane_ctx_pw_init(struct zebra_dplane_ctx *ctx,
 
        ctx->u.pw.fields = pw->data;
 
-       return ret;
+       return AOK;
 }
 
 /*
index 5f9210109d891bfffb260aeb047b49be38e23856..a739b0a68383b6ffca35b38b1743b660d14adea3 100644 (file)
@@ -3236,7 +3236,6 @@ void rib_close_table(struct route_table *table)
  */
 static int handle_pw_result(struct zebra_dplane_ctx *ctx)
 {
-       int ret = 0;
        struct zebra_pw *pw;
        struct zebra_vrf *vrf;
 
@@ -3255,7 +3254,7 @@ static int handle_pw_result(struct zebra_dplane_ctx *ctx)
 
 done:
 
-       return ret;
+       return 0;
 }