diff options
Diffstat (limited to 'usr.sbin/ypldap/entries.c')
-rw-r--r-- | usr.sbin/ypldap/entries.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/usr.sbin/ypldap/entries.c b/usr.sbin/ypldap/entries.c index 3e2cc672786..3d259e6e40d 100644 --- a/usr.sbin/ypldap/entries.c +++ b/usr.sbin/ypldap/entries.c @@ -1,4 +1,4 @@ -/* $OpenBSD: entries.c,v 1.4 2017/07/12 23:18:24 jca Exp $ */ +/* $OpenBSD: entries.c,v 1.5 2022/02/05 22:59:58 naddy Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> * @@ -38,7 +38,6 @@ void flatten_entries(struct env *env) { - size_t wrlen; size_t len; char *linep; char *endp; @@ -54,7 +53,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 @@ -76,7 +74,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 @@ -92,7 +89,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 @@ -113,7 +109,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"); |