]> git.kaiwu.me - nginx.git/commitdiff
use ngx_int_t in ngx_sort() callback
authorIgor Sysoev <igor@sysoev.ru>
Mon, 24 Mar 2008 13:04:02 +0000 (13:04 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 24 Mar 2008 13:04:02 +0000 (13:04 +0000)
src/core/ngx_string.c
src/core/ngx_string.h
src/http/ngx_http.c
src/http/ngx_http_core_module.c
src/http/ngx_http_upstream_round_robin.c
src/mail/ngx_mail.c

index 0ac00174fa7e8f3334afa3b21cf5153fce616480..01d792f36f29f0cc567518c44080bccac0937d82 100644 (file)
@@ -1430,7 +1430,7 @@ ngx_escape_html(u_char *dst, u_char *src, size_t size)
 
 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;
 
index 4fe5cb6040e0e58950b51603cf106c3456278f53..00617f3b203a00d9a78fb87551363c0b05955141 100644 (file)
@@ -173,7 +173,7 @@ uintptr_t ngx_escape_html(u_char *dst, u_char *src, size_t size);
 
 
 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
 
 
index 22866639a8bc554220e0f79ac7d4cc22253f91a1..3ef1dcbc85d355591fce4cc7bbd3d34070f8139a 100644 (file)
@@ -19,7 +19,7 @@ static ngx_int_t ngx_http_add_names(ngx_conf_t *cf,
 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, ngx_array_t *locations,
 }
 
 
-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;
index 08c1d352bd0ca08b7856bf3de9bf3871d69da2b6..ec307cb82b3fc67e7d4630ab2c1bfc0a62d3d3ac 100644 (file)
@@ -45,7 +45,8 @@ static char *ngx_http_core_server(ngx_conf_t *cf, ngx_command_t *cmd,
     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, ngx_command_t *cmd, void *dummy)
 }
 
 
-static int
+static ngx_int_t
 ngx_http_core_cmp_locations(const void *one, const void *two)
 {
     ngx_int_t                  rc;
index c25c076b4ef1e7b777f5ea5daa2e08df133e8f5f..0621371580bee966a2f3db61b3509b69440bb8e5 100644 (file)
@@ -9,7 +9,8 @@
 #include <ngx_http.h>
 
 
-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_conf_t *cf,
 }
 
 
-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;
index 95d29e8939a46591b6c85f27f5705b201f835729..00c2550404ff1b4f21d511f1e15460c4970829ac 100644 (file)
@@ -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_command_t *cmd, void *conf)
 }
 
 
-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;