mirror of
https://github.com/shadow-maint/shadow.git
synced 2024-11-23 10:06:31 +08:00
src/usermod.c: Reduce scope of local variables
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
parent
1ee066ae1e
commit
151f14ad69
@ -687,11 +687,8 @@ fail_exit (int code)
|
||||
|
||||
static void update_group (void)
|
||||
{
|
||||
bool is_member;
|
||||
bool was_member;
|
||||
bool changed;
|
||||
const struct group *grp;
|
||||
struct group *ngrp;
|
||||
bool changed;
|
||||
const struct group *grp;
|
||||
|
||||
changed = false;
|
||||
|
||||
@ -700,6 +697,9 @@ static void update_group (void)
|
||||
* the user is a member of.
|
||||
*/
|
||||
while ((grp = gr_next ()) != NULL) {
|
||||
bool is_member;
|
||||
bool was_member;
|
||||
struct group *ngrp;
|
||||
/*
|
||||
* See if the user specified this group as one of their
|
||||
* concurrent groups.
|
||||
@ -799,12 +799,8 @@ static void update_group (void)
|
||||
#ifdef SHADOWGRP
|
||||
static void update_gshadow (void)
|
||||
{
|
||||
bool is_member;
|
||||
bool was_member;
|
||||
bool was_admin;
|
||||
bool changed;
|
||||
const struct sgrp *sgrp;
|
||||
struct sgrp *nsgrp;
|
||||
bool changed;
|
||||
const struct sgrp *sgrp;
|
||||
|
||||
changed = false;
|
||||
|
||||
@ -813,6 +809,10 @@ static void update_gshadow (void)
|
||||
* that the user is a member of.
|
||||
*/
|
||||
while ((sgrp = sgr_next ()) != NULL) {
|
||||
bool is_member;
|
||||
bool was_member;
|
||||
bool was_admin;
|
||||
struct sgrp *nsgrp;
|
||||
|
||||
/*
|
||||
* See if the user was a member of this group
|
||||
|
Loading…
Reference in New Issue
Block a user