]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/pwd2spwd.c: Simplify style
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 15 Dec 2025 09:41:11 +0000 (10:41 +0100)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Mon, 15 Dec 2025 10:38:34 +0000 (11:38 +0100)
No need for a nested block here.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
lib/pwd2spwd.c

index cabd1f42a1c2ef95ed9aba43936425a9f4aebb33..fceb4d86b783ce4b5450166feb829b8e210f3eba 100644 (file)
@@ -34,18 +34,16 @@ struct spwd *pwd_to_spwd (const struct passwd *pw)
        sp.sp_namp = pw->pw_name;
        sp.sp_pwdp = pw->pw_passwd;
 
-       {
-               /*
-                * Defaults used if there is no pw_age information.
-                */
-               sp.sp_min = 0;
-               sp.sp_max = 10000;
-               sp.sp_lstchg = gettime () / DAY;
-               if (0 == sp.sp_lstchg) {
-                       /* Better disable aging than requiring a password
-                        * change */
-                       sp.sp_lstchg = -1;
-               }
+       /*
+        * Defaults used if there is no pw_age information.
+        */
+       sp.sp_min = 0;
+       sp.sp_max = 10000;
+       sp.sp_lstchg = gettime () / DAY;
+       if (0 == sp.sp_lstchg) {
+               /* Better disable aging than requiring a password
+                * change */
+               sp.sp_lstchg = -1;
        }
 
        /*