summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-06 01:59:20 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-07 15:42:44 +0100
commit55b8413d20d15f342a5c08a3077ca22028fd1a0d (patch)
tree9ea44f7bdb2d8f6fec94cf601d21f9eccffbf260 /src/providers
parent5c95a8f77a37cd9ca4e2f6037bebade5284f415c (diff)
downloadsssd-55b8413d20d15f342a5c08a3077ca22028fd1a0d.tar.gz
sssd-55b8413d20d15f342a5c08a3077ca22028fd1a0d.tar.bz2
sssd-55b8413d20d15f342a5c08a3077ca22028fd1a0d.zip
Fix tevent_req style for sdap_async_sudo.
Use correct name for _done() function from the caller. Remove unneded initializzations to NULL for a lot of variables hat are going to be assigned as the first thing done in the functions.
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/sdap_async_sudo.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/providers/ldap/sdap_async_sudo.c b/src/providers/ldap/sdap_async_sudo.c
index 71bf875d..89e28d89 100644
--- a/src/providers/ldap/sdap_async_sudo.c
+++ b/src/providers/ldap/sdap_async_sudo.c
@@ -84,7 +84,7 @@ static int sdap_sudo_load_sudoers_recv(struct tevent_req *req,
size_t *rules_count,
struct sysdb_attrs ***rules);
-static void sdap_sudo_load_sudoers_done(struct tevent_req *subreq);
+static void sdap_sudo_refresh_load_done(struct tevent_req *subreq);
static int sdap_sudo_purge_sudoers(struct sysdb_ctx *sysdb_ctx,
const char *filter,
@@ -108,8 +108,8 @@ struct tevent_req *sdap_sudo_refresh_send(TALLOC_CTX *mem_ctx,
const char *ldap_filter,
const char *sysdb_filter)
{
- struct tevent_req *req = NULL;
- struct sdap_sudo_refresh_state *state = NULL;
+ struct tevent_req *req;
+ struct sdap_sudo_refresh_state *state;
int ret;
req = tevent_req_create(mem_ctx, &state, struct sdap_sudo_refresh_state);
@@ -169,7 +169,7 @@ int sdap_sudo_refresh_recv(TALLOC_CTX *mem_ctx,
char **usn,
size_t *num_rules)
{
- struct sdap_sudo_refresh_state *state = NULL;
+ struct sdap_sudo_refresh_state *state;
state = tevent_req_data(req, struct sdap_sudo_refresh_state);
@@ -191,8 +191,8 @@ int sdap_sudo_refresh_recv(TALLOC_CTX *mem_ctx,
static int sdap_sudo_refresh_retry(struct tevent_req *req)
{
- struct tevent_req *subreq = NULL;
- struct sdap_sudo_refresh_state *state = NULL;
+ struct sdap_sudo_refresh_state *state;
+ struct tevent_req *subreq;
int ret;
state = tevent_req_data(req, struct sdap_sudo_refresh_state);
@@ -230,8 +230,8 @@ static int sdap_sudo_refresh_retry(struct tevent_req *req)
static void sdap_sudo_refresh_connect_done(struct tevent_req *subreq)
{
- struct tevent_req *req = NULL; /* req from sdap_sudo_refresh_send() */
- struct sdap_sudo_refresh_state *state = NULL;
+ struct tevent_req *req; /* req from sdap_sudo_refresh_send() */
+ struct sdap_sudo_refresh_state *state;
int dp_error;
int ret;
@@ -264,7 +264,7 @@ static void sdap_sudo_refresh_connect_done(struct tevent_req *subreq)
goto fail;
}
- tevent_req_set_callback(subreq, sdap_sudo_load_sudoers_done, req);
+ tevent_req_set_callback(subreq, sdap_sudo_refresh_load_done, req);
return;
@@ -283,8 +283,8 @@ static struct tevent_req * sdap_sudo_load_sudoers_send(TALLOC_CTX *mem_ctx,
{
- struct tevent_req *req = NULL;
- struct sdap_sudo_load_sudoers_state *state = NULL;
+ struct tevent_req *req;
+ struct sdap_sudo_load_sudoers_state *state;
int ret;
req = tevent_req_create(mem_ctx, &state, struct sdap_sudo_load_sudoers_state);
@@ -334,10 +334,10 @@ fail:
static errno_t sdap_sudo_load_sudoers_next_base(struct tevent_req *req)
{
- struct tevent_req *subreq = NULL;
- struct sdap_sudo_load_sudoers_state *state = NULL;
- struct sdap_search_base *search_base = NULL;
- char *filter = NULL;
+ struct sdap_sudo_load_sudoers_state *state;
+ struct sdap_search_base *search_base;
+ struct tevent_req *subreq;
+ char *filter;
state = tevent_req_data(req, struct sdap_sudo_load_sudoers_state);
search_base = state->search_bases[state->base_iter];
@@ -382,9 +382,9 @@ static errno_t sdap_sudo_load_sudoers_next_base(struct tevent_req *req)
static void sdap_sudo_load_sudoers_process(struct tevent_req *subreq)
{
- struct tevent_req *req = NULL;
- struct sdap_sudo_load_sudoers_state *state = NULL;
- struct sdap_search_base *search_base = NULL;
+ struct tevent_req *req;
+ struct sdap_sudo_load_sudoers_state *state;
+ struct sdap_search_base *search_base;
struct sysdb_attrs **attrs = NULL;
size_t count;
int ret;
@@ -443,7 +443,7 @@ static int sdap_sudo_load_sudoers_recv(struct tevent_req *req,
size_t *rules_count,
struct sysdb_attrs ***rules)
{
- struct sdap_sudo_load_sudoers_state *state = NULL;
+ struct sdap_sudo_load_sudoers_state *state;
state = tevent_req_data(req, struct sdap_sudo_load_sudoers_state);
@@ -455,10 +455,10 @@ static int sdap_sudo_load_sudoers_recv(struct tevent_req *req,
return EOK;
}
-static void sdap_sudo_load_sudoers_done(struct tevent_req *subreq)
+static void sdap_sudo_refresh_load_done(struct tevent_req *subreq)
{
- struct tevent_req *req = NULL; /* req from sdap_sudo_refresh_send() */
- struct sdap_sudo_refresh_state *state = NULL;
+ struct tevent_req *req; /* req from sdap_sudo_refresh_send() */
+ struct sdap_sudo_refresh_state *state;
struct sysdb_attrs **rules = NULL;
size_t rules_count = 0;
int ret;