summaryrefslogtreecommitdiff
path: root/nuttx/examples/poll/poll_listener.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-15 19:00:40 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-15 19:00:40 +0000
commit08b2e5a5495fb08277274eaaf91c21069e0fbadf (patch)
tree8fd7037b0159064a937714529251eb34ec4f4e73 /nuttx/examples/poll/poll_listener.c
parentefcfa33c1fa5728dc7c8dd9fd9f20ed7d8a0b27a (diff)
downloadpx4-nuttx-08b2e5a5495fb08277274eaaf91c21069e0fbadf.tar.gz
px4-nuttx-08b2e5a5495fb08277274eaaf91c21069e0fbadf.tar.bz2
px4-nuttx-08b2e5a5495fb08277274eaaf91c21069e0fbadf.zip
Changing NuttX fixed size type names to C99 standard names -- things will be broken for awhile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2351 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/poll/poll_listener.c')
-rw-r--r--nuttx/examples/poll/poll_listener.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/examples/poll/poll_listener.c b/nuttx/examples/poll/poll_listener.c
index c798b6e88..816647e34 100644
--- a/nuttx/examples/poll/poll_listener.c
+++ b/nuttx/examples/poll/poll_listener.c
@@ -41,7 +41,7 @@
#include <sys/types.h>
#include <sys/stat.h>
-
+#include <stdbool.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
@@ -93,8 +93,8 @@ void *poll_listener(pthread_addr_t pvarg)
struct pollfd fds[NPOLLFDS];
char buffer[64];
ssize_t nbytes;
- boolean timeout;
- boolean pollin;
+ bool timeout;
+ bool pollin;
int nevents;
int fd;
int ret;
@@ -128,8 +128,8 @@ void *poll_listener(pthread_addr_t pvarg)
fds[FIFONDX].events = POLLIN;
fds[FIFONDX].revents = 0;
- timeout = FALSE;
- pollin = FALSE;
+ timeout = false;
+ pollin = false;
ret = poll(fds, NPOLLFDS, POLL_LISTENER_DELAY);
@@ -141,7 +141,7 @@ void *poll_listener(pthread_addr_t pvarg)
else if (ret == 0)
{
message("poll_listener: Timeout\n");
- timeout = TRUE;
+ timeout = true;
}
else if (ret > NPOLLFDS)
{
@@ -149,7 +149,7 @@ void *poll_listener(pthread_addr_t pvarg)
}
else
{
- pollin = TRUE;
+ pollin = true;
}
nevents = 0;