diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-17 23:24:22 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-17 23:24:22 +0000 |
commit | 91104de64eeadbaf93afcf2ac6460a998cfc4ed2 (patch) | |
tree | 30aa0263bb192bb6111ce18dd7ba34eb1e39880f | |
parent | 9b43b70ca6acaa4a9cf455b2d317735eb3cc9b7d (diff) | |
download | px4-nuttx-91104de64eeadbaf93afcf2ac6460a998cfc4ed2.tar.gz px4-nuttx-91104de64eeadbaf93afcf2ac6460a998cfc4ed2.tar.bz2 px4-nuttx-91104de64eeadbaf93afcf2ac6460a998cfc4ed2.zip |
Fix improper access to table
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1271 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/fs/fs_poll.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nuttx/fs/fs_poll.c b/nuttx/fs/fs_poll.c index f28e84e26..84d20efe8 100644 --- a/nuttx/fs/fs_poll.c +++ b/nuttx/fs/fs_poll.c @@ -163,12 +163,12 @@ static inline int poll_setup(FAR struct pollfd *fds, nfds_t nfds, sem_t *sem) { /* Setup the poll descriptor */ - fds->sem = sem; - fds->revents = 0; + fds[i].sem = sem; + fds[i].revents = 0; /* Set up the poll */ - ret = poll_fdsetup(fds->fd, fds); + ret = poll_fdsetup(fds[i].fd, &fds[i]); if (ret < 0) { return ret; @@ -201,7 +201,7 @@ static inline int poll_teardown(FAR struct pollfd *fds, nfds_t nfds, int *count) { /* Teardown the poll */ - status = poll_fdsetup(fds->fd, NULL); + status = poll_fdsetup(fds[i].fd, NULL); if (status < 0) { ret = status; @@ -209,14 +209,14 @@ static inline int poll_teardown(FAR struct pollfd *fds, nfds_t nfds, int *count) /* Check if any events were posted */ - if (fds->revents != 0) + if (fds[i].revents != 0) { (*count)++; } /* Un-initialize the poll structure */ - fds->sem = NULL; + fds[i].sem = NULL; } return ret; } |