if capacity error getCapacityInBlocks NULL pointer given return RDE_ST

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
if (!capacity)
{
error("getCapacityInBlocks: NULL pointer given\n");
return RDE_STATUS_INVALID_PARAMETER;
}
return _storage->getCapacityInBlocks(capacity);
}
rde_status_t StorageAccessor::getBlockSize(rde_uint32_t * blockSize)
{
if (!blockSize)
{
error("getBlockSize: NULL pointer given\n");
return RDE_STATUS_INVALID_PARAMETER;
}
*blockSize = _blockSize;
return RDE_STATUS_OK;
}