Refine the preprocessor conditional guard style (#190)

This commit is contained in:
Xiang Xiao
2020-01-31 10:07:39 -08:00
committed by GitHub
parent 68951e8d72
commit 80277d1630
577 changed files with 904 additions and 904 deletions
+1 -1
View File
@@ -34,7 +34,7 @@
****************************************************************************/
#ifndef __FS_CROMFS_CROMFS_H
#define __FS_CROMFS_CROMFS_H 1
#define __FS_CROMFS_CROMFS_H
/****************************************************************************
* Included Files
+4 -4
View File
@@ -225,7 +225,7 @@ static int smartfs_open(FAR struct file *filep, const char *relpath,
}
sf->bflags = 0;
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
sf->entry.name = NULL;
ret = smartfs_finddirentry(fs, &sf->entry, relpath, &parentdirsector,
@@ -385,7 +385,7 @@ errout_with_buffer:
#ifdef CONFIG_SMARTFS_USE_SECTOR_BUFFER
kmm_free(sf->buffer);
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
kmm_free(sf);
errout_with_semaphore:
@@ -816,7 +816,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer,
}
}
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
/* Update our control variables */
@@ -926,7 +926,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer,
sf->curroffset = sizeof(struct smartfs_chain_header_s);
}
}
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
}
ret = byteswritten;
+4 -4
View File
@@ -982,7 +982,7 @@ int smartfs_createentry(FAR struct smartfs_mountpt_s *fs,
entry->flags = (uint16_t) (SMARTFS_DIRENT_EMPTY | type |
(mode & SMARTFS_DIRENT_MODE));
#endif
#endif /* CONFIG_SMARTFS_ERASEDSTATE == 0xff */
#endif /* CONFIG_SMARTFS_ERASEDSTATE == 0xff */
if (sectorno == 0xffff)
{
@@ -1198,7 +1198,7 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs,
#else
direntry->flags |= SMARTFS_DIRENT_ACTIVE;
#endif
#endif /* CONFIG_SMARTFS_ERASEDSTATE == 0xff */
#endif /* CONFIG_SMARTFS_ERASEDSTATE == 0xff */
/* Write the updated flags back to the sector */
@@ -1513,7 +1513,7 @@ int smartfs_sync_internal(FAR struct smartfs_mountpt_s *fs,
sf->byteswritten = 0;
}
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
errout:
return ret;
@@ -1983,7 +1983,7 @@ int smartfs_extendfile(FAR struct smartfs_mountpt_s *fs,
goto errout_with_buffer;
}
}
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
#endif /* CONFIG_SMARTFS_USE_SECTOR_BUFFER */
/* Update our control variables */
+1 -1
View File
@@ -335,4 +335,4 @@ void spiffs_fobj_free(FAR struct spiffs_s *fs,
}
#endif
#endif /* __FS_SPIFFS_SRC_SPIFFS_H */
#endif /* __FS_SPIFFS_SRC_SPIFFS_H */
+1 -1
View File
@@ -279,4 +279,4 @@ void spiffs_cache_page_release(FAR struct spiffs_s *fs,
}
#endif
#endif /* __FS_SPIFFS_SRC_SPIFFS_CACHE_H */
#endif /* __FS_SPIFFS_SRC_SPIFFS_CACHE_H */
+1 -1
View File
@@ -171,4 +171,4 @@ int spiffs_dump(FAR struct spiffs_s *fs);
}
#endif
#endif /* __FS_SPIFFS_SRC_SPIFFS_CHECK_H */
#endif /* __FS_SPIFFS_SRC_SPIFFS_CHECK_H */
+1 -1
View File
@@ -130,4 +130,4 @@ int spiffs_gc_check(FAR struct spiffs_s *fs, off_t len);
}
#endif
#endif /* __FS_SPIFFS_SRC_SPIFFS_GC_H */
#endif /* __FS_SPIFFS_SRC_SPIFFS_GC_H */
+1 -1
View File
@@ -161,4 +161,4 @@ ssize_t spiffs_mtd_erase(FAR struct spiffs_s *fs, off_t offset, size_t len);
}
#endif
#endif /* __FS_SPIFFS_SRC_SPIFFS_MTD_H */
#endif /* __FS_SPIFFS_SRC_SPIFFS_MTD_H */