kpty: move variable to the condition it is used in

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-02-23 20:46:54 +02:00
parent f5c5f3cd63
commit 4d817fc100

View file

@ -146,8 +146,6 @@ bool KPty::open()
d->ownMaster = true;
QByteArray ptyName;
// Find a master pty that we can open ////////////////////////////////
// Because not all the pty animals are created equal, they want to
@ -169,6 +167,8 @@ bool KPty::open()
#else
QByteArray ptyName;
d->masterFd = ::posix_openpt(O_RDWR|O_NOCTTY);
if (d->masterFd >= 0)
{