Skip to content

Commit

Permalink
Fix the clang-format issues
Browse files Browse the repository at this point in the history
---------

Signed-off-by: Andy Pan <[email protected]>
  • Loading branch information
panjf2000 committed Jun 12, 2024
1 parent ef612bc commit 3cb3dac
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/ae_kqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,8 @@ static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) {
struct kevent evs[2];
int nch = 0;

if (mask & AE_READABLE)
EV_SET(evs + nch++, fd, EVFILT_READ, EV_ADD, 0, 0, NULL);
if (mask & AE_WRITABLE)
EV_SET(evs + nch++, fd, EVFILT_WRITE, EV_ADD, 0, 0, NULL);
if (mask & AE_READABLE) EV_SET(evs + nch++, fd, EVFILT_READ, EV_ADD, 0, 0, NULL);
if (mask & AE_WRITABLE) EV_SET(evs + nch++, fd, EVFILT_WRITE, EV_ADD, 0, 0, NULL);

return kevent(state->kqfd, evs, nch, NULL, 0, NULL);
}
Expand All @@ -117,10 +115,8 @@ static void aeApiDelEvent(aeEventLoop *eventLoop, int fd, int mask) {
struct kevent evs[2];
int nch = 0;

if (mask & AE_READABLE)
EV_SET(evs + nch++, fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
if (mask & AE_WRITABLE)
EV_SET(evs + nch++, fd, EVFILT_WRITE, EV_DELETE, 0, 0, NULL);
if (mask & AE_READABLE) EV_SET(evs + nch++, fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
if (mask & AE_WRITABLE) EV_SET(evs + nch++, fd, EVFILT_WRITE, EV_DELETE, 0, 0, NULL);

kevent(state->kqfd, evs, nch, NULL, 0, NULL);
}
Expand Down

0 comments on commit 3cb3dac

Please sign in to comment.