summaryrefslogtreecommitdiff
path: root/src/ae.c
diff options
context:
space:
mode:
authorZerong Yao <zearom32@gmail.com>2021-05-05 20:12:53 +0800
committerGitHub <noreply@github.com>2021-05-05 15:12:53 +0300
commitbcc519fa7cef85adf182af0cfa4aa67a71ad90b9 (patch)
tree1cfb1aca1431c29174a9262d46331d000f18091d /src/ae.c
parenta62801eb534d78163ea53bd0cd39063621a53ead (diff)
downloadredis-bcc519fa7cef85adf182af0cfa4aa67a71ad90b9.tar.gz
remove duplicate fd lookup in aeProcessEvents (#3886)
Minor code cleanup.
Diffstat (limited to 'src/ae.c')
-rw-r--r--src/ae.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ae.c b/src/ae.c
index 4544ff959..6d68f1101 100644
--- a/src/ae.c
+++ b/src/ae.c
@@ -400,9 +400,9 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags)
eventLoop->aftersleep(eventLoop);
for (j = 0; j < numevents; j++) {
- aeFileEvent *fe = &eventLoop->events[eventLoop->fired[j].fd];
- int mask = eventLoop->fired[j].mask;
int fd = eventLoop->fired[j].fd;
+ aeFileEvent *fe = &eventLoop->events[fd];
+ int mask = eventLoop->fired[j].mask;
int fired = 0; /* Number of events fired for current fd. */
/* Normally we execute the readable event first, and the writable