From 7e524bddac1cc98a9bc56e93331da9ac29d32ce5 Mon Sep 17 00:00:00 2001 From: lynch Date: Sun, 12 Nov 2023 13:04:55 +0800 Subject: [PATCH] fix compile errors --- src/ndk_complex_path.c | 6 +++--- src/ndk_string_util.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ndk_complex_path.c b/src/ndk_complex_path.c index a66a808..8b32713 100644 --- a/src/ndk_complex_path.c +++ b/src/ndk_complex_path.c @@ -99,7 +99,6 @@ ndk_conf_set_http_complex_path_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *c char *p = conf; ngx_str_t *path; - ngx_array_t *a; ngx_conf_post_t *post; ndk_http_complex_path_t *cp; @@ -113,13 +112,14 @@ ndk_conf_set_http_complex_path_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *c path++; cp->a = ndk_http_complex_path_create_compile (cf, path, cp->prefix); - if (cp->a == NULL) + if (cp->a == NULL) { /* TODO : log */ return NGX_CONF_ERROR; + } if (cmd->post) { post = cmd->post; - return post->post_handler (cf, post, a); + return post->post_handler (cf, post, cp->a); } return NGX_CONF_OK; diff --git a/src/ndk_string_util.h b/src/ndk_string_util.h index d23b8e1..18a28f0 100644 --- a/src/ndk_string_util.h +++ b/src/ndk_string_util.h @@ -10,5 +10,5 @@ #define ngx_null_enum { ngx_null_string, 0 } -#define ndk_memcpyp(d,s) ngx_memcpy(d,s,sizeof(s)) +#define ndk_memcpyp(d,s) ngx_memcpy(d,s,sizeof(*s))