mirror of https://github.com/ARMmbed/mbed-os.git
Remove unceressary NULL check from BufferedBlockDevice::size()
parent
bcaf37dcfa
commit
6105634bb0
|
@ -31,6 +31,7 @@ BufferedBlockDevice::BufferedBlockDevice(BlockDevice *bd)
|
||||||
: _bd(bd), _bd_program_size(0), _bd_read_size(0), _bd_size(0), _write_cache_addr(0), _write_cache_valid(false),
|
: _bd(bd), _bd_program_size(0), _bd_read_size(0), _bd_size(0), _write_cache_addr(0), _write_cache_valid(false),
|
||||||
_write_cache(0), _read_buf(0), _init_ref_count(0), _is_initialized(false)
|
_write_cache(0), _read_buf(0), _init_ref_count(0), _is_initialized(false)
|
||||||
{
|
{
|
||||||
|
MBED_ASSERT(_bd);
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferedBlockDevice::~BufferedBlockDevice()
|
BufferedBlockDevice::~BufferedBlockDevice()
|
||||||
|
@ -332,11 +333,7 @@ bd_size_t BufferedBlockDevice::size() const
|
||||||
|
|
||||||
const char *BufferedBlockDevice::get_type() const
|
const char *BufferedBlockDevice::get_type() const
|
||||||
{
|
{
|
||||||
if (_bd != NULL) {
|
return _bd->get_type();
|
||||||
return _bd->get_type();
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace mbed
|
} // namespace mbed
|
||||||
|
|
Loading…
Reference in New Issue