diff --git a/lib/port.c b/lib/port.c index cac4ba44..32bb0802 100644 --- a/lib/port.c +++ b/lib/port.c @@ -159,6 +159,9 @@ next: if (',' == *cp) /* end of current tty name */ stpcpy(cp++, ""); } + if (':' != *cp) + goto next; + stpcpy(cp++, ""); port.pt_names[j] = NULL; @@ -187,10 +190,8 @@ next: } else { port.pt_users = 0; } - - if (':' != *cp) { + if (':' != *cp) goto next; - } stpcpy(cp++, "");