From 2cfb58d7535e63c5ef9f3970ebaa189741b715cb Mon Sep 17 00:00:00 2001 From: Ralph Wuerthner Date: Tue, 2 Oct 2018 10:58:12 +0200 Subject: [PATCH] nsswitch: use goto to have only one function return Signed-off-by: Ralph Wuerthner Reviewed-by: Volker Lendecke Reviewed-by: Jeremy Allison --- nsswitch/wb_common.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c index 42b341b8c1c..c2f67d7a556 100644 --- a/nsswitch/wb_common.c +++ b/nsswitch/wb_common.c @@ -731,10 +731,12 @@ NSS_STATUS winbindd_request_response(struct winbindd_context *ctx, } status = winbindd_send_request(ctx, req_type, 0, request); - if (status != NSS_STATUS_SUCCESS) - return (status); + if (status != NSS_STATUS_SUCCESS) { + goto out; + } status = winbindd_get_response(ctx, response); +out: return status; } @@ -750,10 +752,12 @@ NSS_STATUS winbindd_priv_request_response(struct winbindd_context *ctx, } status = winbindd_send_request(ctx, req_type, 1, request); - if (status != NSS_STATUS_SUCCESS) - return (status); + if (status != NSS_STATUS_SUCCESS) { + goto out; + } status = winbindd_get_response(ctx, response); +out: return status; } -- 2.47.2