# HG changeset patch # User Igor Sysoev # Date 1206363842 0 # Node ID cb8c0c8e0c2711871fabd71219a59c328b81661d # Parent 466fdc84c82d36f85a387e2c812a89ba92483db8 use ngx_int_t in ngx_sort() callback diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c --- a/src/core/ngx_string.c +++ b/src/core/ngx_string.c @@ -1430,7 +1430,7 @@ ngx_escape_html(u_char *dst, u_char *src void ngx_sort(void *base, size_t n, size_t size, - int (*cmp)(const void *, const void *)) + ngx_int_t (*cmp)(const void *, const void *)) { u_char *p1, *p2, *p; diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h --- a/src/core/ngx_string.h +++ b/src/core/ngx_string.h @@ -173,7 +173,7 @@ uintptr_t ngx_escape_html(u_char *dst, u void ngx_sort(void *base, size_t n, size_t size, - int (*cmp)(const void *, const void *)); + ngx_int_t (*cmp)(const void *, const void *)); #define ngx_qsort qsort diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -19,7 +19,7 @@ static ngx_int_t ngx_http_add_names(ngx_ static char *ngx_http_merge_locations(ngx_conf_t *cf, ngx_array_t *locations, void **loc_conf, ngx_http_module_t *module, ngx_uint_t ctx_index); -static int ngx_http_cmp_conf_in_addrs(const void *one, const void *two); +static ngx_int_t ngx_http_cmp_conf_in_addrs(const void *one, const void *two); static int ngx_libc_cdecl ngx_http_cmp_dns_wildcards(const void *one, const void *two); @@ -1089,7 +1089,7 @@ ngx_http_merge_locations(ngx_conf_t *cf, } -static int +static ngx_int_t ngx_http_cmp_conf_in_addrs(const void *one, const void *two) { ngx_http_conf_in_addr_t *first, *second; diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -45,7 +45,8 @@ static char *ngx_http_core_server(ngx_co void *dummy); static char *ngx_http_core_location(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy); -static int ngx_http_core_cmp_locations(const void *first, const void *second); +static ngx_int_t ngx_http_core_cmp_locations(const void *first, + const void *second); static char *ngx_http_core_types(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); @@ -2297,7 +2298,7 @@ ngx_http_core_location(ngx_conf_t *cf, n } -static int +static ngx_int_t ngx_http_core_cmp_locations(const void *one, const void *two) { ngx_int_t rc; diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c --- a/src/http/ngx_http_upstream_round_robin.c +++ b/src/http/ngx_http_upstream_round_robin.c @@ -9,7 +9,8 @@ #include -static int ngx_http_upstream_cmp_servers(const void *one, const void *two); +static ngx_int_t ngx_http_upstream_cmp_servers(const void *one, + const void *two); static ngx_uint_t ngx_http_upstream_get_peer(ngx_http_upstream_rr_peers_t *peers); @@ -185,7 +186,7 @@ ngx_http_upstream_init_round_robin(ngx_c } -static int +static ngx_int_t ngx_http_upstream_cmp_servers(const void *one, const void *two) { ngx_http_upstream_rr_peer_t *first, *second; diff --git a/src/mail/ngx_mail.c b/src/mail/ngx_mail.c --- a/src/mail/ngx_mail.c +++ b/src/mail/ngx_mail.c @@ -11,7 +11,7 @@ static char *ngx_mail_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); -static int ngx_mail_cmp_conf_in_addrs(const void *one, const void *two); +static ngx_int_t ngx_mail_cmp_conf_in_addrs(const void *one, const void *two); ngx_uint_t ngx_mail_max_module; @@ -388,7 +388,7 @@ ngx_mail_block(ngx_conf_t *cf, ngx_comma } -static int +static ngx_int_t ngx_mail_cmp_conf_in_addrs(const void *one, const void *two) { ngx_mail_conf_in_addr_t *first, *second;