summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2010-09-02 10:07:33 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-09-08 09:36:22 -0400
commite35fa36e5c005986978cc7463f54dc29d3eacd66 (patch)
treea20b72e9002e81c039da54922dda09da904ff14c /src/responder
parent87f2bb60510f31fec012d126411f09a99c72140e (diff)
downloadsssd-e35fa36e5c005986978cc7463f54dc29d3eacd66.tar.gz
sssd-e35fa36e5c005986978cc7463f54dc29d3eacd66.tar.xz
sssd-e35fa36e5c005986978cc7463f54dc29d3eacd66.zip
Dead assignments cleanup in NSS responder
Various dead assignments were deleted, some return value inspections were added. Ticket: #588
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/common/negcache.c2
-rw-r--r--src/responder/nss/nsssrv_cmd.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/responder/common/negcache.c b/src/responder/common/negcache.c
index 521a2e76e..9ba24c811 100644
--- a/src/responder/common/negcache.c
+++ b/src/responder/common/negcache.c
@@ -395,7 +395,6 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache,
}
filter_list[1] = NULL;
}
- ret = EOK;
}
else if (ret != EOK) goto done;
@@ -486,7 +485,6 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache,
}
filter_list[1] = NULL;
}
- ret = EOK;
}
else if (ret != EOK) goto done;
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 9b7551384..719608c0c 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -1272,6 +1272,9 @@ static int nss_cmd_endpwent(struct cli_ctx *cctx)
sss_packet_get_cmd(cctx->creq->in),
&cctx->creq->out);
+ if (ret != EOK) {
+ return ret;
+ }
if (nctx->pctx == NULL) goto done;
/* free results and reset */
@@ -2342,6 +2345,9 @@ static int nss_cmd_endgrent(struct cli_ctx *cctx)
sss_packet_get_cmd(cctx->creq->in),
&cctx->creq->out);
+ if (ret != EOK) {
+ return ret;
+ }
if (nctx->gctx == NULL) goto done;
/* free results and reset */
@@ -2395,11 +2401,7 @@ static int nss_cmd_initgr_send_reply(struct nss_dom_ctx *dctx)
{
struct nss_cmd_ctx *cmdctx = dctx->cmdctx;
struct cli_ctx *cctx = cmdctx->cctx;
- struct nss_ctx *nctx;
int ret;
- int i;
-
- nctx = talloc_get_type(cctx->rctx->pvt_ctx, struct nss_ctx);
ret = sss_packet_new(cctx->creq, 0,
sss_packet_get_cmd(cctx->creq->in),
@@ -2407,7 +2409,7 @@ static int nss_cmd_initgr_send_reply(struct nss_dom_ctx *dctx)
if (ret != EOK) {
return EFAULT;
}
- i = dctx->res->count;
+
ret = fill_initgr(cctx->creq->out, dctx->res);
if (ret) {
return ret;