From: nekral-guest Date: Tue, 1 Jan 2008 15:52:07 +0000 (+0000) Subject: Simplify pwck's main(). Remove gotos. X-Git-Tag: 4.1.1~176 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d022527b71ddf94e49de9fd0e0f2029c79e3a728;p=shadow Simplify pwck's main(). Remove gotos. --- 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; - } - - check_pw_file (&errors, &changed); - - if (!is_shadow) - goto shadow_done; - - check_spw_file (&errors, &changed); + } else { + check_pw_file (&errors, &changed); - shadow_done: + if (is_shadow) { + check_spw_file (&errors, &changed); + } + } - write_and_bye: close_files (changed); nscd_flush_cache ("passwd");