From e209a6e73be0c3b69b1c1ae50ece0c96efad6f1b Mon Sep 17 00:00:00 2001 From: murata Date: Sun, 30 Jan 2022 10:11:59 +0900 Subject: [PATCH] AP_Filesystem: Remove WHITE SPACE to match other method styles --- libraries/AP_Filesystem/AP_Filesystem_FATFS.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/AP_Filesystem/AP_Filesystem_FATFS.cpp b/libraries/AP_Filesystem/AP_Filesystem_FATFS.cpp index 1ded2ab6e3..b330a09b57 100644 --- a/libraries/AP_Filesystem/AP_Filesystem_FATFS.cpp +++ b/libraries/AP_Filesystem/AP_Filesystem_FATFS.cpp @@ -64,7 +64,7 @@ static int new_file_descriptor(const char *pathname) if (isatty_(i)) { continue; } - if ( file_table[i] == NULL) { + if (file_table[i] == NULL) { stream = (FAT_FILE *) calloc(sizeof(FAT_FILE),1); if (stream == NULL) { errno = ENOMEM; @@ -146,14 +146,14 @@ static FIL *fileno_to_fatfs(int fileno) FAT_FILE *stream; FIL *fh; - if (isatty_( fileno )) { + if (isatty_(fileno)) { errno = EBADF; return nullptr; } // checks if fileno out of bounds stream = fileno_to_stream(fileno); - if ( stream == nullptr ) { + if (stream == nullptr) { return nullptr; } @@ -165,9 +165,9 @@ static FIL *fileno_to_fatfs(int fileno) return fh; } -static int fatfs_to_errno( FRESULT Result ) +static int fatfs_to_errno(FRESULT Result) { - switch ( Result ) { + switch (Result) { case FR_OK: /* FatFS (0) Succeeded */ return 0; /* POSIX OK */ case FR_DISK_ERR: /* FatFS (1) A hard error occurred in the low level disk I/O layer */ @@ -405,7 +405,7 @@ int32_t AP_Filesystem_FATFS::read(int fd, void *buf, uint32_t count) // fileno_to_fatfs checks for fd out of bounds fh = fileno_to_fatfs(fd); - if ( fh == nullptr ) { + if (fh == nullptr) { errno = EBADF; return -1; } @@ -450,7 +450,7 @@ int32_t AP_Filesystem_FATFS::write(int fd, const void *buf, uint32_t count) // fileno_to_fatfs checks for fd out of bounds fh = fileno_to_fatfs(fd); - if ( fh == nullptr ) { + if (fh == nullptr) { errno = EBADF; return -1; } @@ -611,7 +611,7 @@ int AP_Filesystem_FATFS::stat(const char *name, struct stat *buf) // We only handle read only case mode = (FATFS_R | FATFS_X); - if ( !(info.fattrib & AM_RDO)) { + if (!(info.fattrib & AM_RDO)) { mode |= (FATFS_W); // enable write if NOT read only }