Skip to content

Commit c1a0472

Browse files
committed
style: fixed code style.
Use nginx macros instead of the original "memmove" and remove unnecessary spaces.
1 parent 583f0f4 commit c1a0472

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/ngx_http_lua_accessby.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ ngx_http_lua_access_handler(ngx_http_request_t *r)
6464

6565
tmp = *cur_ph;
6666

67-
memmove(cur_ph, cur_ph + 1,
68-
(last_ph - cur_ph) * sizeof (ngx_http_phase_handler_t));
67+
ngx_memmove(cur_ph, cur_ph + 1,
68+
(last_ph - cur_ph) * sizeof(ngx_http_phase_handler_t));
6969

7070
*last_ph = tmp;
7171

src/ngx_http_lua_precontentby.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ ngx_http_lua_precontent_handler(ngx_http_request_t *r)
5656

5757
tmp = *cur_ph;
5858

59-
memmove(cur_ph, cur_ph + 1,
60-
(last_ph - cur_ph) * sizeof (ngx_http_phase_handler_t));
59+
ngx_memmove(cur_ph, cur_ph + 1,
60+
(last_ph - cur_ph) * sizeof(ngx_http_phase_handler_t));
6161

6262
*last_ph = tmp;
6363

src/ngx_http_lua_rewriteby.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ ngx_http_lua_rewrite_handler(ngx_http_request_t *r)
6464
if (cur_ph < last_ph) {
6565
dd("swapping the contents of cur_ph and last_ph...");
6666

67-
tmp = *cur_ph;
67+
tmp = *cur_ph;
6868

69-
memmove(cur_ph, cur_ph + 1,
70-
(last_ph - cur_ph) * sizeof (ngx_http_phase_handler_t));
69+
ngx_memmove(cur_ph, cur_ph + 1,
70+
(last_ph - cur_ph) * sizeof(ngx_http_phase_handler_t));
7171

7272
*last_ph = tmp;
7373

0 commit comments

Comments
 (0)