mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
fs/mqueue: add missing FAR specifier
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
0e42808923
commit
e77ec6c8c6
+6
-5
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
static int nxmq_file_close(FAR struct file *filep);
|
static int nxmq_file_close(FAR struct file *filep);
|
||||||
static int nxmq_file_poll(FAR struct file *filep,
|
static int nxmq_file_poll(FAR struct file *filep,
|
||||||
struct pollfd *fds, bool setup);
|
FAR struct pollfd *fds, bool setup);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
@@ -88,7 +88,7 @@ static int nxmq_file_close(FAR struct file *filep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int nxmq_file_poll(FAR struct file *filep,
|
static int nxmq_file_poll(FAR struct file *filep,
|
||||||
struct pollfd *fds, bool setup)
|
FAR struct pollfd *fds, bool setup)
|
||||||
{
|
{
|
||||||
FAR struct inode *inode = filep->f_inode;
|
FAR struct inode *inode = filep->f_inode;
|
||||||
FAR struct mqueue_inode_s *msgq = inode->i_private;
|
FAR struct mqueue_inode_s *msgq = inode->i_private;
|
||||||
@@ -105,7 +105,7 @@ static int nxmq_file_poll(FAR struct file *filep,
|
|||||||
{
|
{
|
||||||
/* Find an available slot */
|
/* Find an available slot */
|
||||||
|
|
||||||
if (!msgq->fds[i])
|
if (msgq->fds[i] == NULL)
|
||||||
{
|
{
|
||||||
/* Bind the poll structure and this slot */
|
/* Bind the poll structure and this slot */
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ static int nxmq_file_poll(FAR struct file *filep,
|
|||||||
eventset |= POLLOUT;
|
eventset |= POLLOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msgq->nmsgs)
|
if (msgq->nmsgs > 0)
|
||||||
{
|
{
|
||||||
eventset |= POLLIN;
|
eventset |= POLLIN;
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,8 @@ errout:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int file_mq_vopen(FAR struct file *mq, FAR const char *mq_name,
|
static int file_mq_vopen(FAR struct file *mq, FAR const char *mq_name,
|
||||||
int oflags, mode_t umask, va_list ap, int *created)
|
int oflags, mode_t umask, va_list ap,
|
||||||
|
FAR int *created)
|
||||||
{
|
{
|
||||||
FAR struct inode *inode;
|
FAR struct inode *inode;
|
||||||
FAR struct mqueue_inode_s *msgq;
|
FAR struct mqueue_inode_s *msgq;
|
||||||
|
|||||||
Reference in New Issue
Block a user