Simplify pwck's main(). Remove gotos.

This commit is contained in:
nekral-guest 2008-01-01 15:52:07 +00:00
parent 3ad9a439d5
commit d022527b71

View File

@ -606,19 +606,14 @@ int main (int argc, char **argv)
if (is_shadow) if (is_shadow)
spw_sort (); spw_sort ();
changed = 1; changed = 1;
goto write_and_bye; } else {
check_pw_file (&errors, &changed);
if (is_shadow) {
check_spw_file (&errors, &changed);
}
} }
check_pw_file (&errors, &changed);
if (!is_shadow)
goto shadow_done;
check_spw_file (&errors, &changed);
shadow_done:
write_and_bye:
close_files (changed); close_files (changed);
nscd_flush_cache ("passwd"); nscd_flush_cache ("passwd");