summaryrefslogtreecommitdiff
path: root/nuttx/fs/nxffs
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-11-25 14:10:35 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-11-25 14:10:35 -0600
commite814f226d6aa6c1700706bb8db9c190b8244eee5 (patch)
tree43d0dfba6c451cf16eef42251d776dc4e14cbec6 /nuttx/fs/nxffs
parentf28eff61aeb62c867249c8cb21162dbd3c60cc37 (diff)
downloadnuttx-e814f226d6aa6c1700706bb8db9c190b8244eee5.tar.gz
nuttx-e814f226d6aa6c1700706bb8db9c190b8244eee5.tar.bz2
nuttx-e814f226d6aa6c1700706bb8db9c190b8244eee5.zip
More fixes to problems noted by cppcheck. Some are kind of risky; some are real bugs.
Diffstat (limited to 'nuttx/fs/nxffs')
-rw-r--r--nuttx/fs/nxffs/nxffs_stat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nuttx/fs/nxffs/nxffs_stat.c b/nuttx/fs/nxffs/nxffs_stat.c
index 656da395a..2a5b61044 100644
--- a/nuttx/fs/nxffs/nxffs_stat.c
+++ b/nuttx/fs/nxffs/nxffs_stat.c
@@ -151,7 +151,6 @@ int nxffs_stat(FAR struct inode *mountpt, FAR const char *relpath,
memset(buf, 0, sizeof(struct stat));
buf->st_blksize = volume->geo.blocksize;
- buf->st_blocks = entry.datlen / (volume->geo.blocksize - SIZEOF_NXFFS_BLOCK_HDR);
/* The requested directory must be the volume-relative "root" directory */
@@ -166,6 +165,7 @@ int nxffs_stat(FAR struct inode *mountpt, FAR const char *relpath,
goto errout_with_semaphore;
}
+ buf->st_blocks = entry.datlen / (volume->geo.blocksize - SIZEOF_NXFFS_BLOCK_HDR);
buf->st_mode = S_IFREG|S_IXOTH|S_IXGRP|S_IXUSR;
buf->st_size = entry.datlen;
buf->st_atime = entry.utc;