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
This commit is contained in:
parent
47233f1b3c
commit
9a71271f07
@ -1440,15 +1440,11 @@ int nxffs_pack(FAR struct nxffs_volume_s *volume)
|
|||||||
{
|
{
|
||||||
DEBUGASSERT(packed == true);
|
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)
|
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
|
|
||||||
{
|
{
|
||||||
/* Pack write data into this block */
|
/* Pack write data into this block */
|
||||||
|
|
||||||
@ -1487,7 +1483,7 @@ int nxffs_pack(FAR struct nxffs_volume_s *volume)
|
|||||||
volume->geo.blocksize - pack.iooffset);
|
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.
|
* first byte after the block header.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user