sssd/0062-AD-Clean-up-ad_access_gpo.patch

60 lines
1.7 KiB
Diff

From d7efa39ab732fb034f51501cb2b1b8d3b1716979 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 14 Apr 2015 13:07:36 -0400
Subject: [PATCH 62/99] 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)
---
src/providers/ad/ad_gpo.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/providers/ad/ad_gpo.c b/src/providers/ad/ad_gpo.c
index a881741a6ead9244ac123608234d1a0c35f830e3..54e5545a57b7e697f730431ae35a95ccabbe21db 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;
}
--
2.4.0