diff options
author | Volker Lendecke <vl@samba.org> | 2017-07-15 11:54:14 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-11-18 00:09:16 +0100 |
commit | d74c60807cdaec2835c400a6de0fa5e381cc1392 (patch) | |
tree | da59f944d7a632a7cb3db38fbaa70f9074770d72 /nsswitch | |
parent | ffbf393fba69d715d150fbc4f147bf0a97fbb69a (diff) | |
download | samba-d74c60807cdaec2835c400a6de0fa5e381cc1392.tar.gz |
nsswitch: Slightly simplify winbindd_request_response
We don't need a separate variable, C passes a copy on the stack
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'nsswitch')
-rw-r--r-- | nsswitch/wb_common.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c index 262181a3cff..d6746b4f535 100644 --- a/nsswitch/wb_common.c +++ b/nsswitch/wb_common.c @@ -719,16 +719,15 @@ NSS_STATUS winbindd_request_response(struct winbindd_context *ctx, struct winbindd_response *response) { NSS_STATUS status = NSS_STATUS_UNAVAIL; - struct winbindd_context *wb_ctx = ctx; if (ctx == NULL) { - wb_ctx = &wb_global_ctx; + ctx = &wb_global_ctx; } - status = winbindd_send_request(wb_ctx, req_type, 0, request); + status = winbindd_send_request(ctx, req_type, 0, request); if (status != NSS_STATUS_SUCCESS) return (status); - status = winbindd_get_response(wb_ctx, response); + status = winbindd_get_response(ctx, response); return status; } @@ -739,16 +738,15 @@ NSS_STATUS winbindd_priv_request_response(struct winbindd_context *ctx, struct winbindd_response *response) { NSS_STATUS status = NSS_STATUS_UNAVAIL; - struct winbindd_context *wb_ctx = ctx; if (ctx == NULL) { - wb_ctx = &wb_global_ctx; + ctx = &wb_global_ctx; } - status = winbindd_send_request(wb_ctx, req_type, 1, request); + status = winbindd_send_request(ctx, req_type, 1, request); if (status != NSS_STATUS_SUCCESS) return (status); - status = winbindd_get_response(wb_ctx, response); + status = winbindd_get_response(ctx, response); return status; } |