Skip to content

Commit

Permalink
util: check revents in release builds
Browse files Browse the repository at this point in the history
Signed-off-by: He Xian <hexian000@outlook.com>
  • Loading branch information
hexian000 committed Jan 31, 2024
1 parent 76ca44e commit bf73181
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ extern struct mcache *msgpool;
const int err = errno; \
LOGE_F("error event: [errno=%d] %s", err, \
strerror(err)); \
if (((revents) & (accept)) == 0) { \
return; \
} \
} else { \
assert(((revents) & (accept)) == (revents)); \
} \
assert(((revents) & ((accept) | EV_ERROR)) == (revents)); \
if (((revents) & (accept)) == 0) { \
return; \
} \
} while (0)

Expand Down

0 comments on commit bf73181

Please sign in to comment.