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
This commit is contained in:
parent
52a542adfc
commit
c1d9a877a4
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user