diff --git a/lib/port.c b/lib/port.c index 60ff8989..4da49d68 100644 --- a/lib/port.c +++ b/lib/port.c @@ -339,10 +339,8 @@ static struct port *getttyuser (const char *tty, const char *user) setportent (); while ((port = getportent ()) != NULL) { - if ( (0 == port->pt_names) - || (0 == port->pt_users)) { + if (NULL == port->pt_users) continue; - } for (i = 0; NULL != port->pt_names[i]; i++) { if (portcmp (port->pt_names[i], tty) == 0) {