summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2015-04-14 13:07:36 -0400
committerJakub Hrozek <jhrozek@redhat.com>2015-04-15 17:33:25 +0200
commitd7efa39ab732fb034f51501cb2b1b8d3b1716979 (patch)
tree036479e4fb45409d4059bc87f87ad11b293f192b /src
parentd008c239c62ab6a467559156d5df854b099e4422 (diff)
downloadsssd-d7efa39ab732fb034f51501cb2b1b8d3b1716979.tar.gz
sssd-d7efa39ab732fb034f51501cb2b1b8d3b1716979.tar.xz
sssd-d7efa39ab732fb034f51501cb2b1b8d3b1716979.zip
AD: Clean up ad_access_gpo
Align goto usage with conventions in the rest of the source. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> (cherry picked from commit d9079aa05eb8aacb488992fdce328c1abadd08d8)
Diffstat (limited to 'src')
-rw-r--r--src/providers/ad/ad_gpo.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/providers/ad/ad_gpo.c b/src/providers/ad/ad_gpo.c
index a881741a6..54e5545a5 100644
--- a/src/providers/ad/ad_gpo.c
+++ b/src/providers/ad/ad_gpo.c
@@ -1534,8 +1534,6 @@ ad_gpo_access_send(TALLOC_CTX *mem_ctx,
if (gpo_map_type == GPO_MAP_PERMIT) {
ret = EOK;
- tevent_req_done(req);
- tevent_req_post(req, ev);
goto immediately;
}
@@ -1551,8 +1549,6 @@ ad_gpo_access_send(TALLOC_CTX *mem_ctx,
"ad_gpo_access_control option were set to enforcing " \
"mode.");
ret = EOK;
- tevent_req_done(req);
- tevent_req_post(req, ev);
goto immediately;
default:
ret = EINVAL;
@@ -1592,15 +1588,17 @@ ad_gpo_access_send(TALLOC_CTX *mem_ctx,
}
tevent_req_set_callback(subreq, ad_gpo_connect_done, req);
- ret = EOK;
+ return req;
immediately:
- if (ret != EOK) {
+ if (ret == EOK) {
+ tevent_req_done(req);
+ } else {
tevent_req_error(req, ret);
- tevent_req_post(req, ev);
}
+ tevent_req_post(req, ev);
return req;
}