]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
child-sa: Use single return statement in update_usebytes()
authorThomas Egerer <thomas.egerer@secunet.com>
Tue, 15 Nov 2016 17:27:55 +0000 (18:27 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 18 Nov 2016 10:58:14 +0000 (11:58 +0100)
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
src/libcharon/sa/child_sa.c

index e4364de12fd6405e98fcd746a07f9fc13f35d3d9..56dcd702ffa3147f0d8c69692bb8cb1242e96871 100644 (file)
@@ -495,9 +495,11 @@ static status_t update_usebytes(private_child_sa_t *this, bool inbound)
                                        {
                                                this->my_usetime = time;
                                        }
-                                       return SUCCESS;
                                }
-                               return FAILED;
+                               else
+                               {
+                                       status = FAILED;
+                               }
                        }
                }
        }
@@ -526,9 +528,11 @@ static status_t update_usebytes(private_child_sa_t *this, bool inbound)
                                        {
                                                this->other_usetime = time;
                                        }
-                                       return SUCCESS;
                                }
-                               return FAILED;
+                               else
+                               {
+                                       status = FAILED;
+                               }
                        }
                }
        }