From d022527b71ddf94e49de9fd0e0f2029c79e3a728 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Tue, 1 Jan 2008 15:52:07 +0000 Subject: [PATCH] Simplify pwck's main(). Remove gotos. --- src/pwck.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/pwck.c b/src/pwck.c index 5ef80253..84ec83b5 100644 --- a/src/pwck.c +++ b/src/pwck.c @@ -606,19 +606,14 @@ int main (int argc, char **argv) if (is_shadow) spw_sort (); 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); nscd_flush_cache ("passwd");