From: Lars Op den Kamp Date: Thu, 12 Jan 2012 11:41:05 +0000 (+0100) Subject: cec: rewrote an assignment within a condition, so the silly vs compiler understands... X-Git-Tag: upstream/2.2.0~1^2~41^2~8 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d956c02e62e94806340bac2260daba9992eeafb4;p=deb_libcec.git cec: rewrote an assignment within a condition, so the silly vs compiler understands it too. fixes win32 compilation --- diff --git a/src/lib/AdapterCommunication.cpp b/src/lib/AdapterCommunication.cpp index d33ad2f..8d351f0 100644 --- a/src/lib/AdapterCommunication.cpp +++ b/src/lib/AdapterCommunication.cpp @@ -286,7 +286,7 @@ bool CAdapterCommunication::Open(const char *strPort, uint16_t iBaudRate /* = 38 bool bConnected(false); while (!bConnected && iNow < iTimeout) { - if (!(bConnected = m_port->Open(strPort, iBaudRate))) + if ((bConnected = m_port->Open(strPort, iBaudRate)) == false) { strError.Format("error opening serial port '%s': %s", strPort, m_port->GetError().c_str()); Sleep(250);