Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
214d880b
Commit
214d880b
authored
Nov 24, 2009
by
antirez
Browse files
minor fix to avoid a false valgrind warning.
parent
7785121a
Changes
1
Hide whitespace changes
Inline
Side-by-side
ae_epoll.c
View file @
214d880b
...
@@ -36,6 +36,7 @@ static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) {
...
@@ -36,6 +36,7 @@ static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) {
if
(
mask
&
AE_READABLE
)
ee
.
events
|=
EPOLLIN
;
if
(
mask
&
AE_READABLE
)
ee
.
events
|=
EPOLLIN
;
if
(
mask
&
AE_WRITABLE
)
ee
.
events
|=
EPOLLOUT
;
if
(
mask
&
AE_WRITABLE
)
ee
.
events
|=
EPOLLOUT
;
if
(
mask
&
AE_EXCEPTION
)
ee
.
events
|=
EPOLLPRI
;
if
(
mask
&
AE_EXCEPTION
)
ee
.
events
|=
EPOLLPRI
;
ee
.
data
.
u64
=
0
;
/* avoid valgrind warning */
ee
.
data
.
fd
=
fd
;
ee
.
data
.
fd
=
fd
;
if
(
epoll_ctl
(
state
->
epfd
,
op
,
fd
,
&
ee
)
==
-
1
)
return
-
1
;
if
(
epoll_ctl
(
state
->
epfd
,
op
,
fd
,
&
ee
)
==
-
1
)
return
-
1
;
return
0
;
return
0
;
...
@@ -50,6 +51,7 @@ static void aeApiDelEvent(aeEventLoop *eventLoop, int fd, int delmask) {
...
@@ -50,6 +51,7 @@ static void aeApiDelEvent(aeEventLoop *eventLoop, int fd, int delmask) {
if
(
mask
&
AE_READABLE
)
ee
.
events
|=
EPOLLIN
;
if
(
mask
&
AE_READABLE
)
ee
.
events
|=
EPOLLIN
;
if
(
mask
&
AE_WRITABLE
)
ee
.
events
|=
EPOLLOUT
;
if
(
mask
&
AE_WRITABLE
)
ee
.
events
|=
EPOLLOUT
;
if
(
mask
&
AE_EXCEPTION
)
ee
.
events
|=
EPOLLPRI
;
if
(
mask
&
AE_EXCEPTION
)
ee
.
events
|=
EPOLLPRI
;
ee
.
data
.
u64
=
0
;
/* avoid valgrind warning */
ee
.
data
.
fd
=
fd
;
ee
.
data
.
fd
=
fd
;
if
(
mask
!=
AE_NONE
)
{
if
(
mask
!=
AE_NONE
)
{
epoll_ctl
(
state
->
epfd
,
EPOLL_CTL_MOD
,
fd
,
&
ee
);
epoll_ctl
(
state
->
epfd
,
EPOLL_CTL_MOD
,
fd
,
&
ee
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment