]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/: Cosmetic
authorAlejandro Colomar <alx@kernel.org>
Fri, 26 Dec 2025 17:29:10 +0000 (18:29 +0100)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Fri, 20 Feb 2026 13:58:48 +0000 (14:58 +0100)
Fix style.

Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/chgpasswd.c
src/chpasswd.c

index d9e37002e46855870b7559710c7ebea3deb384d0..48a6cfcedd4a02cb1637dbd19996e370f1b583c9 100644 (file)
@@ -156,9 +156,8 @@ static void process_flags (int argc, char **argv, struct option_flags *flags)
                {"sha-rounds",   required_argument, NULL, 's'},
                {NULL, 0, NULL, '\0'}
        };
-       while ((c = getopt_long (argc, argv,
-                                "c:ehmR:s:",
-                                long_options, NULL)) != -1) {
+       while (-1 != (c = getopt_long(argc, argv, "c:ehmR:s:", long_options, NULL)))
+       {
                switch (c) {
                case 'c':
                        crypt_method = optarg;
index de5c79c70c5d8c466230fea2afc5e5050159ab24..0b1334eb665562e4f7541bd9d528f579b6e5dfe2 100644 (file)
@@ -161,9 +161,8 @@ static void process_flags (int argc, char **argv, struct option_flags *flags)
                {NULL, 0, NULL, '\0'}
        };
 
-       while ((c = getopt_long (argc, argv,
-                                "c:ehmR:P:s:",
-                                long_options, NULL)) != -1) {
+       while (-1 != (c = getopt_long(argc, argv, "c:ehmR:P:s:", long_options, NULL)))
+       {
                switch (c) {
                case 'c':
                        crypt_method = optarg;