cosmetics
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 2 Feb 2012 10:09:43 +0000 (11:09 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 2 Feb 2012 10:11:49 +0000 (11:11 +0100)
src/lib/adapter/USBCECAdapterCommunication.cpp
src/testclient/main.cpp

index b439f748aeb5e3a9ceeaaa742768152a92a126dd..12b8eacde7f70b2197656cf78d8a6cd7c33576d5 100644 (file)
@@ -605,9 +605,7 @@ void CUSBCECAdapterCommunication::SendMessageToAdapter(CCECAdapterMessage *msg)
 
   if (m_port->Write(msg->packet.data, msg->Size()) != (ssize_t) msg->Size())
   {
-    CStdString strError;
-    strError.Format("error writing to serial port: %s", m_port->GetError().c_str());
-    CLibCEC::AddLog(CEC_LOG_ERROR, strError);
+    CLibCEC::AddLog(CEC_LOG_ERROR, "error writing to serial port: %s", m_port->GetError().c_str());
     msg->state = ADAPTER_MESSAGE_STATE_ERROR;
   }
   else
index f6152e0dea44a68cf1ad2e0dec0b83e547fb91fb..b324de214a408fe03678c94af0ceb06eed937fe6 100644 (file)
@@ -190,16 +190,16 @@ void EnableCallbacks(ICECAdapter *adapter)
 void ListDevices(ICECAdapter *parser)
 {
   cec_adapter *devices = new cec_adapter[10];
-  uint8_t iDevicesFound = parser->FindAdapters(devices, 10, NULL);
+  int8_t iDevicesFound = parser->FindAdapters(devices, 10, NULL);
   if (iDevicesFound <= 0)
   {
     PrintToStdOut("Found devices: NONE");
   }
   else
   {
-    PrintToStdOut("Found devices: %d", iDevicesFound);
+    PrintToStdOut("Found devices: %d\n", iDevicesFound);
     for (unsigned int iDevicePtr = 0; iDevicePtr < iDevicesFound; iDevicePtr++)
-      PrintToStdOut("device:        %d\npath:          %s\ncom port:      %s", iDevicePtr + 1, devices[iDevicePtr].path, devices[iDevicePtr].comm);
+      PrintToStdOut("device:        %d\npath:          %s\ncom port:      %s\n", iDevicePtr + 1, devices[iDevicePtr].path, devices[iDevicePtr].comm);
   }
 }