Commit d2a78def authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: ptr_cmp

1. don't cast size_t* to int*
2. remove long obsolete register specifier
parent 20c3b2ff
...@@ -88,8 +88,8 @@ qsort2_cmp get_ptr_compare (size_t size) ...@@ -88,8 +88,8 @@ qsort2_cmp get_ptr_compare (size_t size)
static int ptr_compare(size_t *compare_length, uchar **a, uchar **b) static int ptr_compare(size_t *compare_length, uchar **a, uchar **b)
{ {
reg3 int length= *compare_length; size_t length= *compare_length;
reg1 uchar *first,*last; uchar *first,*last;
first= *a; last= *b; first= *a; last= *b;
while (--length) while (--length)
...@@ -103,8 +103,8 @@ static int ptr_compare(size_t *compare_length, uchar **a, uchar **b) ...@@ -103,8 +103,8 @@ static int ptr_compare(size_t *compare_length, uchar **a, uchar **b)
static int ptr_compare_0(size_t *compare_length,uchar **a, uchar **b) static int ptr_compare_0(size_t *compare_length,uchar **a, uchar **b)
{ {
reg3 int length= *compare_length; size_t length= *compare_length;
reg1 uchar *first,*last; uchar *first,*last;
first= *a; last= *b; first= *a; last= *b;
loop: loop:
...@@ -124,8 +124,8 @@ static int ptr_compare_0(size_t *compare_length,uchar **a, uchar **b) ...@@ -124,8 +124,8 @@ static int ptr_compare_0(size_t *compare_length,uchar **a, uchar **b)
static int ptr_compare_1(size_t *compare_length,uchar **a, uchar **b) static int ptr_compare_1(size_t *compare_length,uchar **a, uchar **b)
{ {
reg3 int length= *compare_length-1; size_t length= *compare_length-1;
reg1 uchar *first,*last; uchar *first,*last;
first= *a+1; last= *b+1; first= *a+1; last= *b+1;
cmp(-1); cmp(-1);
...@@ -145,8 +145,8 @@ static int ptr_compare_1(size_t *compare_length,uchar **a, uchar **b) ...@@ -145,8 +145,8 @@ static int ptr_compare_1(size_t *compare_length,uchar **a, uchar **b)
static int ptr_compare_2(size_t *compare_length,uchar **a, uchar **b) static int ptr_compare_2(size_t *compare_length,uchar **a, uchar **b)
{ {
reg3 int length= *compare_length-2; size_t length= *compare_length-2;
reg1 uchar *first,*last; uchar *first,*last;
first= *a +2 ; last= *b +2; first= *a +2 ; last= *b +2;
cmp(-2); cmp(-2);
...@@ -167,8 +167,8 @@ static int ptr_compare_2(size_t *compare_length,uchar **a, uchar **b) ...@@ -167,8 +167,8 @@ static int ptr_compare_2(size_t *compare_length,uchar **a, uchar **b)
static int ptr_compare_3(size_t *compare_length,uchar **a, uchar **b) static int ptr_compare_3(size_t *compare_length,uchar **a, uchar **b)
{ {
reg3 int length= *compare_length-3; size_t length= *compare_length-3;
reg1 uchar *first,*last; uchar *first,*last;
first= *a +3 ; last= *b +3; first= *a +3 ; last= *b +3;
cmp(-3); cmp(-3);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment