Formatting and cleanup

This commit is contained in:
Maschell
2021-09-25 14:26:18 +02:00
parent 13ed348f43
commit aa90e2478b
38 changed files with 367 additions and 395 deletions

View File

@@ -9,7 +9,7 @@
int32_t FSUtils::LoadFileToMem(const char *filepath, uint8_t **inbuffer, uint32_t *size) {
//! always initialze input
*inbuffer = NULL;
*inbuffer = nullptr;
if (size)
*size = 0;
@@ -21,7 +21,7 @@ int32_t FSUtils::LoadFileToMem(const char *filepath, uint8_t **inbuffer, uint32_
lseek(iFd, 0, SEEK_SET);
uint8_t *buffer = (uint8_t *) malloc(filesize);
if (buffer == NULL) {
if (buffer == nullptr) {
close(iFd);
return -2;
}
@@ -44,7 +44,7 @@ int32_t FSUtils::LoadFileToMem(const char *filepath, uint8_t **inbuffer, uint32_
if (done != filesize) {
free(buffer);
buffer = NULL;
buffer = nullptr;
return -3;
}