mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
Refine the preprocessor conditional guard style (#190)
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __FS_CROMFS_CROMFS_H
|
||||
#define __FS_CROMFS_CROMFS_H 1
|
||||
#define __FS_CROMFS_CROMFS_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user