ypldap: Remove set but unused variables.
Some of these were reported by GCC, others reported by clang.
This commit is contained in:
@@ -40,7 +40,6 @@
|
||||
void
|
||||
flatten_entries(struct env *env)
|
||||
{
|
||||
size_t wrlen;
|
||||
size_t len;
|
||||
char *linep;
|
||||
char *endp;
|
||||
@@ -56,7 +55,6 @@ flatten_entries(struct env *env)
|
||||
*
|
||||
* An extra octet is alloced to make space for an additional NUL.
|
||||
*/
|
||||
wrlen = env->sc_user_line_len;
|
||||
if ((linep = calloc(1, env->sc_user_line_len + 1)) == NULL) {
|
||||
/*
|
||||
* XXX: try allocating a smaller chunk of memory
|
||||
@@ -78,7 +76,6 @@ flatten_entries(struct env *env)
|
||||
free(ue->ue_line);
|
||||
ue->ue_line = endp;
|
||||
endp += len;
|
||||
wrlen -= len;
|
||||
|
||||
/*
|
||||
* To save memory strdup(3) the netid_line which originally used
|
||||
@@ -94,7 +91,6 @@ flatten_entries(struct env *env)
|
||||
env->sc_user_lines = linep;
|
||||
log_debug("done pushing users");
|
||||
|
||||
wrlen = env->sc_group_line_len;
|
||||
if ((linep = calloc(1, env->sc_group_line_len + 1)) == NULL) {
|
||||
/*
|
||||
* XXX: try allocating a smaller chunk of memory
|
||||
@@ -115,7 +111,6 @@ flatten_entries(struct env *env)
|
||||
free(ge->ge_line);
|
||||
ge->ge_line = endp;
|
||||
endp += len;
|
||||
wrlen -= len;
|
||||
}
|
||||
env->sc_group_lines = linep;
|
||||
log_debug("done pushing groups");
|
||||
|
||||
@@ -346,7 +346,7 @@ client_shutdown(void)
|
||||
pid_t
|
||||
ldapclient(int pipe_main2client[2])
|
||||
{
|
||||
pid_t pid, dns_pid;
|
||||
pid_t pid;
|
||||
int pipe_dns[2];
|
||||
struct passwd *pw;
|
||||
struct event ev_sigint;
|
||||
@@ -371,7 +371,7 @@ ldapclient(int pipe_main2client[2])
|
||||
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_dns) == -1)
|
||||
fatal("socketpair");
|
||||
dns_pid = ypldap_dns(pipe_dns, pw);
|
||||
ypldap_dns(pipe_dns, pw);
|
||||
close(pipe_dns[1]);
|
||||
|
||||
#ifndef DEBUG
|
||||
|
||||
@@ -268,9 +268,6 @@ yp_dispatch(struct svc_req *req, SVCXPRT *trans)
|
||||
int
|
||||
yp_check(struct svc_req *req)
|
||||
{
|
||||
struct sockaddr_in *caller;
|
||||
|
||||
caller = svc_getcaller(req->rq_xprt);
|
||||
/*
|
||||
* We might want to know who we allow here.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user