mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-28 20:58:31 +00:00
Style changes in poll()
This commit is contained in:
1 parent
6bc6022aa9
commit
63ccf8199f
1 file changed
+2
-3
+2
-3
@@ -187,7 +187,7 @@ typedef struct DIR {
|
|||||||
struct dirent result;
|
struct dirent result;
|
||||||
} DIR;
|
} DIR;
|
||||||
|
|
||||||
#ifndef HAS_POLL
|
#ifndef HAVE_POLL
|
||||||
struct pollfd {
|
struct pollfd {
|
||||||
int fd;
|
int fd;
|
||||||
short events;
|
short events;
|
||||||
@@ -1222,8 +1222,7 @@ static struct dirent *readdir(DIR *dir) {
|
|||||||
static int poll(struct pollfd *pfd, int n, int milliseconds) {
|
static int poll(struct pollfd *pfd, int n, int milliseconds) {
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
fd_set set;
|
fd_set set;
|
||||||
int i, result;
|
int i, result, maxfd = 0;
|
||||||
int maxfd = 0;
|
|
||||||
|
|
||||||
tv.tv_sec = milliseconds / 1000;
|
tv.tv_sec = milliseconds / 1000;
|
||||||
tv.tv_usec = (milliseconds % 1000) * 1000;
|
tv.tv_usec = (milliseconds % 1000) * 1000;
|
||||||
|
|||||||
Reference in new issue
Block a user