lib/gshadow.c: Remove redundant variables

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2024-11-05 15:30:41 +01:00
committed by Serge Hallyn
parent 5ba62265b3
commit 2f4b5f5d80

View File

@@ -28,9 +28,7 @@
static /*@null@*/FILE *shadow;
static /*@null@*//*@only@*/char **members = NULL;
static /*@null@*//*@only@*/char **admins = NULL;
static struct sgrp sgroup;
static struct sgrp sgroup = {};
#define FIELDS 4
@@ -115,11 +113,11 @@ sgetsgent(const char *string)
sgroup.sg_name = fields[0];
sgroup.sg_passwd = fields[1];
free (admins);
free (members);
free(sgroup.sg_adm);
free(sgroup.sg_mem);
sgroup.sg_adm = admins = build_list(fields[2]);
sgroup.sg_mem = members = build_list(fields[3]);
sgroup.sg_adm = build_list(fields[2]);
sgroup.sg_mem = build_list(fields[3]);
return &sgroup;
}