Move initialization above point of first possible reference to

avoid overwriting ty_status values set from the 'type' field.

Previously TTY_DIALUP and TTY_NETWORK flags did not match
specified type.
This commit is contained in:
Matthew N. Dodd 2005-07-25 17:57:15 +00:00
parent f4e31e2e89
commit 50007d443b

View file

@ -105,6 +105,10 @@ getttyent()
zapchar = 0;
tty.ty_name = p;
tty.ty_status = 0;
tty.ty_window = NULL;
tty.ty_group = _TTYS_NOGROUP;
p = skip(p);
if (!*(tty.ty_getty = p))
tty.ty_getty = tty.ty_type = NULL;
@ -121,9 +125,6 @@ getttyent()
p = skip(p);
}
}
tty.ty_status = 0;
tty.ty_window = NULL;
tty.ty_group = _TTYS_NOGROUP;
for (; *p; p = skip(p)) {
if (scmp(_TTYS_OFF))