]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/port.c: getportent(): Rename goto label
authorAlejandro Colomar <alx@kernel.org>
Tue, 2 Jul 2024 12:23:19 +0000 (14:23 +0200)
committerSerge Hallyn <serge@hallyn.com>
Sat, 6 Jul 2024 12:44:02 +0000 (07:44 -0500)
This label means we detected a bogus line, and want to skip it and jump
to the next one; rename it accordingly.  'again' seemed to say that it
was somehow looping on the same line.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/port.c

index 04dc5c1c242182efbc5ce779a17582df31f73977..7348030e57b8f0ea7a0f09f5be8aade3b4dcca04 100644 (file)
@@ -130,7 +130,7 @@ static struct port *getportent (void)
         *      - parse off a list of days and times
         */
 
-again:
+next:
 
        /*
         * Get the next line and remove optional trailing '\n'.
@@ -142,7 +142,7 @@ again:
                return 0;
        }
        if ('#' == buf[0]) {
-               goto again;
+               goto next;
        }
 
        /*
@@ -159,7 +159,7 @@ again:
                port.pt_names[j] = cp;
                cp = strpbrk(cp, ":,");
                if (cp == NULL)
-                       goto again;     /* line format error */
+                       goto next;      /* line format error */
 
                if (':' == *cp) {       /* end of tty name list */
                        break;
@@ -195,7 +195,7 @@ again:
        }
 
        if (':' != *cp) {
-               goto again;
+               goto next;
        }
 
        stpcpy(cp++, "");
@@ -292,7 +292,7 @@ again:
                }
 
                if (('-' != cp[i]) || (dtime > 2400) || ((dtime % 100) > 59)) {
-                       goto again;
+                       goto next;
                }
                port.pt_times[j].t_start = dtime;
                cp = cp + i + 1;
@@ -304,7 +304,7 @@ again:
                if (   ((',' != cp[i]) && ('\0' != cp[i]))
                    || (dtime > 2400)
                    || ((dtime % 100) > 59)) {
-                       goto again;
+                       goto next;
                }
 
                port.pt_times[j].t_end = dtime;