]> 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)
committerAlejandro Colomar <alx@kernel.org>
Sun, 14 Jul 2024 22:55:27 +0000 (00:55 +0200)
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>
Cherry-picked-from: e790993c5d7c ("lib/port.c: getportent(): Rename goto label")
Link: <https://github.com/shadow-maint/shadow/pull/1037>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/port.c

index 5f49984f6179520ca2c7bca4978a047de4a8186d..4b933333e1e8604c13c772c1d346494712a1c2bc 100644 (file)
@@ -127,7 +127,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'.
@@ -139,7 +139,7 @@ again:
                return 0;
        }
        if ('#' == buf[0]) {
-               goto again;
+               goto next;
        }
 
        /*
@@ -156,7 +156,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;
        }
 
        *cp = '\0';
@@ -293,7 +293,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;
@@ -305,7 +305,7 @@ again:
                if (   ((',' != cp[i]) && ('\0' != cp[i]))
                    || (dtime > 2400)
                    || ((dtime % 100) > 59)) {
-                       goto again;
+                       goto next;
                }
 
                port.pt_times[j].t_end = dtime;