From c1d9a877a40aa434c47c34d8f6646c9b305e1e5a Mon Sep 17 00:00:00 2001 From: Fredrik Modeen Date: Fri, 12 Sep 2008 07:07:00 +0000 Subject: [PATCH] Fixed CID 1031: removed check _fDevice for NULL as we do new BList in constructor also removed temp var count as _fDevice->CountItems() should return 0 if empty git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27438 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/device/SerialPort.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/kits/device/SerialPort.cpp b/src/kits/device/SerialPort.cpp index d39de1587e..09e6c705bd 100644 --- a/src/kits/device/SerialPort.cpp +++ b/src/kits/device/SerialPort.cpp @@ -479,15 +479,9 @@ BSerialPort::WaitForInput(void) int32 BSerialPort::CountDevices() { - int32 count = 0; - // Refresh devices list ScanDevices(); - - if (_fDevices != NULL) - count = _fDevices->CountItems(); - - return count; + return _fDevices->CountItems(); }