cec: rewrote an assignment within a condition, so the silly vs compiler understands...
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 12 Jan 2012 11:41:05 +0000 (12:41 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 12 Jan 2012 11:41:05 +0000 (12:41 +0100)
src/lib/AdapterCommunication.cpp

index d33ad2f84165b1fb52ddede687487430cf158ee9..8d351f058a49164409bd11380211934aa1d650a7 100644 (file)
@@ -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);