mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
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:
parent
f4e31e2e89
commit
50007d443b
1 changed files with 4 additions and 3 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue