mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:43:28 +08:00
nuttx/fs: Fix some spacing and alignment issues
This commit is contained in:
+14
-14
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user