Mercurial > hg > nginx
comparison src/core/ngx_string.c @ 1956:cb8c0c8e0c27
use ngx_int_t in ngx_sort() callback
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 24 Mar 2008 13:04:02 +0000 |
parents | 466fdc84c82d |
children | 2a92804f4109 d7d3a72c07d8 |
comparison
equal
deleted
inserted
replaced
1955:466fdc84c82d | 1956:cb8c0c8e0c27 |
---|---|
1428 | 1428 |
1429 /* ngx_sort() is implemented as insertion sort because we need stable sort */ | 1429 /* ngx_sort() is implemented as insertion sort because we need stable sort */ |
1430 | 1430 |
1431 void | 1431 void |
1432 ngx_sort(void *base, size_t n, size_t size, | 1432 ngx_sort(void *base, size_t n, size_t size, |
1433 int (*cmp)(const void *, const void *)) | 1433 ngx_int_t (*cmp)(const void *, const void *)) |
1434 { | 1434 { |
1435 u_char *p1, *p2, *p; | 1435 u_char *p1, *p2, *p; |
1436 | 1436 |
1437 p = ngx_alloc(size, ngx_cycle->log); | 1437 p = ngx_alloc(size, ngx_cycle->log); |
1438 if (p == NULL) { | 1438 if (p == NULL) { |