1
0
forked from fsfw/fsfw

Actually, not that horrible, thanks to sed

This commit is contained in:
2020-04-21 22:28:43 +02:00
parent 2093329481
commit cf3190a904
51 changed files with 458 additions and 566 deletions

View File

@ -69,12 +69,12 @@ uint8_t* PoolRawAccess::getEntry() {
}
ReturnValue_t PoolRawAccess::getEntryEndianSafe(uint8_t* buffer,
uint32_t* writtenBytes, uint32_t max_size) {
uint32_t* writtenBytes, uint32_t maxSize) {
uint8_t* data_ptr = getEntry();
// debug << "PoolRawAccess::getEntry: Array position: " << index * size_of_type << " Size of T: " << (int)size_of_type << " ByteSize: " << byte_size << " Position: " << *size << std::endl;
if (typeSize == 0)
return DATA_POOL_ACCESS_FAILED;
if (typeSize > max_size)
if (typeSize > maxSize)
return INCORRECT_SIZE;
#ifndef BYTE_ORDER_SYSTEM
#error BYTE_ORDER_SYSTEM not defined
@ -149,7 +149,7 @@ ReturnValue_t PoolRawAccess::serialize(uint8_t** buffer, size_t* size,
size_t maxSize, Endianness streamEndianness) const {
//TODO integer overflow
if (typeSize + *size <= maxSize) {
#error use endian swapper
#warning use endian swapper
if (1) {
#ifndef BYTE_ORDER_SYSTEM
#error BYTE_ORDER_SYSTEM not defined