nuttx/fs: Fix some spacing and alignment issues

This commit is contained in:
Gregory Nutt
2015-10-11 11:39:29 -06:00
parent 185b941c27
commit c70987e551
51 changed files with 568 additions and 539 deletions
+14 -14
View File
@@ -164,25 +164,25 @@ void mq_inode_release(FAR struct inode *inode)
* the inode now.
*/
if (inode->i_crefs <= 0 && (inode->i_flags & FSNODEFLAG_DELETED) != 0)
{
FAR struct mqueue_inode_s *msgq = inode->u.i_mqueue;
DEBUGASSERT(msgq);
if (inode->i_crefs <= 0 && (inode->i_flags & FSNODEFLAG_DELETED) != 0)
{
FAR struct mqueue_inode_s *msgq = inode->u.i_mqueue;
DEBUGASSERT(msgq);
/* Free the message queue (and any messages left in it) */
/* Free the message queue (and any messages left in it) */
mq_msgqfree(msgq);
inode->u.i_mqueue = NULL;
mq_msgqfree(msgq);
inode->u.i_mqueue = NULL;
/* Release and free the inode container. If it has been properly
* unlinked, then the peer pointer should be NULL.
*/
/* Release and free the inode container. If it has been properly
* unlinked, then the peer pointer should be NULL.
*/
inode_semgive();
inode_semgive();
DEBUGASSERT(inode->i_peer == NULL);
inode_free(inode);
return;
DEBUGASSERT(inode->i_peer == NULL);
inode_free(inode);
return;
}
inode_semgive();
+6 -6
View File
@@ -158,7 +158,7 @@ mqd_t mq_open(FAR const char *mq_name, int oflags, ...)
* create a new mqueue with this name.
*/
if ((oflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
{
errcode = EEXIST;
goto errout_with_inode;
@@ -186,13 +186,13 @@ mqd_t mq_open(FAR const char *mq_name, int oflags, ...)
goto errout_with_lock;
}
/* Create the mqueue. First we have to extract the additional
* parameters from the variable argument list.
*/
/* Create the mqueue. First we have to extract the additional
* parameters from the variable argument list.
*/
va_start(ap, oflags);
mode = va_arg(ap, mode_t);
attr = va_arg(ap, FAR struct mq_attr*);
attr = va_arg(ap, FAR struct mq_attr *);
va_end(ap);
/* Create an inode in the pseudo-filesystem at this path */
@@ -211,7 +211,7 @@ mqd_t mq_open(FAR const char *mq_name, int oflags, ...)
* be created with a reference count of zero.
*/
msgq = (FAR struct mqueue_inode_s*)mq_msgqalloc(mode, attr);
msgq = (FAR struct mqueue_inode_s *)mq_msgqalloc(mode, attr);
if (!msgq)
{
errcode = ENOSPC;