summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-29 20:30:19 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-29 20:30:19 +0000
commita38f876d17eea850192519f03a602d7c7e58530b (patch)
treed4eaf5c185d46575b62f4c50ec3eba8c2db02da8
parent4610a2d28a1e52200bb622b426eeaed3d2a96834 (diff)
downloadnuttx-a38f876d17eea850192519f03a602d7c7e58530b.tar.gz
nuttx-a38f876d17eea850192519f03a602d7c7e58530b.tar.bz2
nuttx-a38f876d17eea850192519f03a602d7c7e58530b.zip
Minor improvement to fix of last checkin
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4069 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/fs/nxffs/nxffs_pack.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/nuttx/fs/nxffs/nxffs_pack.c b/nuttx/fs/nxffs/nxffs_pack.c
index d0e5deb56..9c629e2aa 100644
--- a/nuttx/fs/nxffs/nxffs_pack.c
+++ b/nuttx/fs/nxffs/nxffs_pack.c
@@ -1440,15 +1440,11 @@ int nxffs_pack(FAR struct nxffs_volume_s *volume)
{
DEBUGASSERT(packed == true);
- /* Make sure there is space at this location for an inode header */
+ /* Make sure there is space at this location for an inode
+ * header.
+ */
- if (pack.iooffset + SIZEOF_NXFFS_INODE_HDR > volume->geo.blocksize)
- {
- /* No.. not enough space here. Skip the rest of this block */
-
- pack.iooffset = SIZEOF_NXFFS_BLOCK_HDR;
- }
- else
+ if (pack.iooffset + SIZEOF_NXFFS_INODE_HDR <= volume->geo.blocksize)
{
/* Pack write data into this block */
@@ -1487,7 +1483,7 @@ int nxffs_pack(FAR struct nxffs_volume_s *volume)
volume->geo.blocksize - pack.iooffset);
}
- /* Next time we get here, pack.iooffset will point to the
+ /* Next time through the loop, pack.iooffset will point to the
* first byte after the block header.
*/