diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-14 16:04:52 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-15 20:51:29 +0200 |
commit | c05cdf26c872f76dad82194305c28a53e9123677 (patch) | |
tree | b9c48a759b8b2e58c4714e11aa8cd992de8bd0a4 /tests/core/test_poll.in | |
parent | 94e1d887ffebcbf640fbca19c76331f6dffbff23 (diff) |
Fix the indentation of core test input files with clang-format.
Diffstat (limited to 'tests/core/test_poll.in')
-rw-r--r-- | tests/core/test_poll.in | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/tests/core/test_poll.in b/tests/core/test_poll.in index 3fb0ebc9..aa2c09ee 100644 --- a/tests/core/test_poll.in +++ b/tests/core/test_poll.in @@ -1,30 +1,28 @@ +#include <stdio.h> +#include <errno.h> +#include <fcntl.h> +#include <poll.h> - #include <stdio.h> - #include <errno.h> - #include <fcntl.h> - #include <poll.h> +int main() { + struct pollfd multi[5]; + multi[0].fd = open("/file", O_RDONLY, 0777); + multi[1].fd = open("/device", O_RDONLY, 0777); + multi[2].fd = 123; + multi[3].fd = open("/file", O_RDONLY, 0777); + multi[4].fd = open("/file", O_RDONLY, 0777); + multi[0].events = POLLIN | POLLOUT | POLLNVAL | POLLERR; + multi[1].events = POLLIN | POLLOUT | POLLNVAL | POLLERR; + multi[2].events = POLLIN | POLLOUT | POLLNVAL | POLLERR; + multi[3].events = 0x00; + multi[4].events = POLLOUT | POLLNVAL | POLLERR; - int main() { - struct pollfd multi[5]; - multi[0].fd = open("/file", O_RDONLY, 0777); - multi[1].fd = open("/device", O_RDONLY, 0777); - multi[2].fd = 123; - multi[3].fd = open("/file", O_RDONLY, 0777); - multi[4].fd = open("/file", O_RDONLY, 0777); - multi[0].events = POLLIN | POLLOUT | POLLNVAL | POLLERR; - multi[1].events = POLLIN | POLLOUT | POLLNVAL | POLLERR; - multi[2].events = POLLIN | POLLOUT | POLLNVAL | POLLERR; - multi[3].events = 0x00; - multi[4].events = POLLOUT | POLLNVAL | POLLERR; + printf("ret: %d\n", poll(multi, 5, 123)); + printf("errno: %d\n", errno); + printf("multi[0].revents: %d\n", multi[0].revents == (POLLIN | POLLOUT)); + printf("multi[1].revents: %d\n", multi[1].revents == (POLLIN | POLLOUT)); + printf("multi[2].revents: %d\n", multi[2].revents == POLLNVAL); + printf("multi[3].revents: %d\n", multi[3].revents == 0); + printf("multi[4].revents: %d\n", multi[4].revents == POLLOUT); - printf("ret: %d\n", poll(multi, 5, 123)); - printf("errno: %d\n", errno); - printf("multi[0].revents: %d\n", multi[0].revents == (POLLIN | POLLOUT)); - printf("multi[1].revents: %d\n", multi[1].revents == (POLLIN | POLLOUT)); - printf("multi[2].revents: %d\n", multi[2].revents == POLLNVAL); - printf("multi[3].revents: %d\n", multi[3].revents == 0); - printf("multi[4].revents: %d\n", multi[4].revents == POLLOUT); - - return 0; - } -
\ No newline at end of file + return 0; +} |