This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 2ab9a848a0 fs/romfs: Move rn_child/rn_count before rn_namesize
2ab9a848a0 is described below

commit 2ab9a848a0b2afed244cf4278f048919d89d21d2
Author: Xiang Xiao <[email protected]>
AuthorDate: Mon Jan 8 05:56:13 2024 +0800

    fs/romfs: Move rn_child/rn_count before rn_namesize
    
    which could save 4 bytes for each node
    
    Signed-off-by: Xiang Xiao <[email protected]>
---
 fs/romfs/fs_romfs.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/romfs/fs_romfs.h b/fs/romfs/fs_romfs.h
index 20eabc3bc2..71dd3f7166 100644
--- a/fs/romfs/fs_romfs.h
+++ b/fs/romfs/fs_romfs.h
@@ -160,14 +160,12 @@ struct romfs_file_s
 
 struct romfs_nodeinfo_s
 {
-#ifdef CONFIG_FS_ROMFS_CACHE_NODE
-  FAR struct romfs_nodeinfo_s **rn_child;  /* The node array for link to lower 
level */
-  uint16_t rn_count;                       /* The count of node in rn_child 
level */
-#endif
   uint32_t rn_offset;                      /* Offset of real file header */
   uint32_t rn_next;                        /* Offset of the next file 
header+flags */
   uint32_t rn_size;                        /* Size (if file) */
 #ifdef CONFIG_FS_ROMFS_CACHE_NODE
+  FAR struct romfs_nodeinfo_s **rn_child;  /* The node array for link to lower 
level */
+  uint16_t rn_count;                       /* The count of node in rn_child 
level */
   uint8_t  rn_namesize;                    /* The length of name of the entry 
*/
   char     rn_name[1];                     /* The name to the entry */
 #endif

Reply via email to