From 1042b9194f2ab7b056f7c6a02f86b26ef1323be1 Mon Sep 17 00:00:00 2001 From: Thomas Egerer Date: Tue, 15 Nov 2016 18:27:55 +0100 Subject: [PATCH] child-sa: Use single return statement in update_usebytes() Signed-off-by: Thomas Egerer --- src/libcharon/sa/child_sa.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/libcharon/sa/child_sa.c b/src/libcharon/sa/child_sa.c index e4364de12..56dcd702f 100644 --- a/src/libcharon/sa/child_sa.c +++ b/src/libcharon/sa/child_sa.c @@ -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; + } } } }