mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 11:03:16 +08:00
fs: fix pre-existing nxstyle issues in touched files
Fix coding style violations detected by CI whole-file nxstyle scan: - fs/smartfs/smartfs_utils.c: add missing braces after if (L334), fix bad alignment (L414), fix switch brace alignment (L1531) - fs/hostfs/hostfs.c: add blank line after declaration (L576) These are pre-existing style issues in master, not introduced by this PR, but reported because CI checks the entire touched file. Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
This commit is contained in:
+16
-14
@@ -331,7 +331,9 @@ int smartfs_unmount(FAR struct smartfs_mountpt_s *fs)
|
||||
/* Test if this FS's blkdriver matches ours (it could be us) */
|
||||
|
||||
if (nextfs->fs_blkdriver == fs->fs_blkdriver)
|
||||
count++;
|
||||
{
|
||||
count++;
|
||||
}
|
||||
|
||||
/* Test if this entry is our's */
|
||||
|
||||
@@ -411,7 +413,7 @@ int smartfs_unmount(FAR struct smartfs_mountpt_s *fs)
|
||||
#else
|
||||
if (fs->fs_blkdriver)
|
||||
{
|
||||
inode = fs->fs_blkdriver;
|
||||
inode = fs->fs_blkdriver;
|
||||
if (inode)
|
||||
{
|
||||
if (inode->u.i_bops && inode->u.i_bops->close)
|
||||
@@ -1528,20 +1530,20 @@ off_t smartfs_seek_internal(FAR struct smartfs_mountpt_s *fs,
|
||||
/* Calculate the file position to seek to based on current position */
|
||||
|
||||
switch (whence)
|
||||
{
|
||||
case SEEK_SET:
|
||||
default:
|
||||
newpos = offset;
|
||||
break;
|
||||
{
|
||||
case SEEK_SET:
|
||||
default:
|
||||
newpos = offset;
|
||||
break;
|
||||
|
||||
case SEEK_CUR:
|
||||
newpos = sf->filepos + offset;
|
||||
break;
|
||||
case SEEK_CUR:
|
||||
newpos = sf->filepos + offset;
|
||||
break;
|
||||
|
||||
case SEEK_END:
|
||||
newpos = sf->entry.datlen + offset;
|
||||
break;
|
||||
}
|
||||
case SEEK_END:
|
||||
newpos = sf->entry.datlen + offset;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Ensure newpos is in range */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user