]> granicus.if.org Git - shadow/commitdiff
Simplify pwck's main(). Remove gotos.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 1 Jan 2008 15:52:07 +0000 (15:52 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 1 Jan 2008 15:52:07 +0000 (15:52 +0000)
src/pwck.c

index 5ef802532d3328aa0617a2235d2a8405cf3fe0cd..84ec83b59c7c93b4a14d9c393f32b1ed7aca9a49 100644 (file)
@@ -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");