nsswitch: use goto to have only one function return
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>
Tue, 2 Oct 2018 08:58:12 +0000 (10:58 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 1 Nov 2018 00:59:10 +0000 (01:59 +0100)
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
nsswitch/wb_common.c

index 42b341b..c2f67d7 100644 (file)
@@ -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;
 }