Skip to content

Commit fc3f1bb

Browse files
author
jiahao
committed
style: ep -> epoll_created.
1 parent 994c672 commit fc3f1bb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/event/ngx_http_lua_epoll.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static ngx_int_t ngx_http_lua_epoll_clear_event(ngx_event_t *ev,
1717
static ngx_int_t ngx_http_lua_epoll_process_event(ngx_http_request_t *r,
1818
ngx_msec_t timer);
1919

20-
static int ep = -1;
20+
static int epoll_created = -1;
2121

2222
ngx_http_lua_event_actions_t ngx_http_lua_epoll = {
2323
ngx_http_lua_epoll_init_event,
@@ -30,9 +30,9 @@ ngx_http_lua_event_actions_t ngx_http_lua_epoll = {
3030
static ngx_int_t
3131
ngx_http_lua_epoll_init_event(ngx_cycle_t *cycle)
3232
{
33-
ep = epoll_create(1);
33+
epoll_created = epoll_create(1);
3434

35-
if (ep == -1) {
35+
if (epoll_created == -1) {
3636
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
3737
"lua epoll_create() failed");
3838

@@ -82,7 +82,7 @@ ngx_http_lua_epoll_set_event(ngx_event_t *ev, ngx_int_t event)
8282
ee.events = events;
8383
ee.data.ptr = c;
8484

85-
if (epoll_ctl(ep, op, c->fd, &ee) == -1) {
85+
if (epoll_ctl(epoll_created, op, c->fd, &ee) == -1) {
8686
ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
8787
"lua epoll_ctl(EPOLL_CTL_ADD, %d) failed, add event: %d",
8888
c->fd, events);
@@ -127,7 +127,7 @@ ngx_http_lua_epoll_clear_event(ngx_event_t *ev, ngx_int_t event)
127127
ee.data.ptr = NULL;
128128
}
129129

130-
if (epoll_ctl(ep, op, c->fd, &ee) == -1) {
130+
if (epoll_ctl(epoll_created, op, c->fd, &ee) == -1) {
131131
ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
132132
"lua epoll_ctl(EPOLL_CTL_DEL, %d) failed", c->fd);
133133

@@ -150,7 +150,7 @@ ngx_http_lua_epoll_process_event(ngx_http_request_t *r, ngx_msec_t timer)
150150
ngx_connection_t *c;
151151
struct epoll_event ee;
152152

153-
events = epoll_wait(ep, &ee, 1, timer);
153+
events = epoll_wait(epoll_created, &ee, 1, timer);
154154

155155
err = (events == -1) ? ngx_errno : 0;
156156

0 commit comments

Comments
 (0)