diff options
author | Zerong Yao <zearom32@gmail.com> | 2021-05-05 20:12:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-05 15:12:53 +0300 |
commit | bcc519fa7cef85adf182af0cfa4aa67a71ad90b9 (patch) | |
tree | 1cfb1aca1431c29174a9262d46331d000f18091d /src/ae.c | |
parent | a62801eb534d78163ea53bd0cd39063621a53ead (diff) | |
download | redis-bcc519fa7cef85adf182af0cfa4aa67a71ad90b9.tar.gz |
remove duplicate fd lookup in aeProcessEvents (#3886)
Minor code cleanup.
Diffstat (limited to 'src/ae.c')
-rw-r--r-- | src/ae.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |