Re: [ZEND-ENGINE-CVS] cvs: Zend / zend_qsort.c

From: Date: Fri, 10 May 2002 23:22:58 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: Zend / zend_qsort.c
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-112@lists.php.net to get a copy of this message
What about Engine 2? Andi At 21:21 10/05/2002 +0000, Sterling Hughes wrote:
sterling                Fri May 10 17:21:27 2002 EDT
Modified files:
    /Zend       zend_qsort.c
Log: Apply casting patch by stig v. (not to be confused with stiglet, our benevolent release master :) Index: Zend/zend_qsort.c diff -u Zend/zend_qsort.c:1.4 Zend/zend_qsort.c:1.5
--- Zend/zend_qsort.c:1.4       Sun Jan  6 10:21:09 2002
+++ Zend/zend_qsort.c Fri May 10 17:21:27 2002 @@ -32,23 +32,21 @@
        int             t_i;
        char            t_c;
-       for (i = sizeof(int); i <= siz; i += sizeof(int)) {
-               tmp_a_int = (int *) a;
-               tmp_b_int = (int *) b;
+       tmp_a_int = (int *) a;
+       tmp_b_int = (int *) b;
+       for (i = sizeof(int); i <= siz; i += sizeof(int)) {
                t_i = *tmp_a_int;
-
-               *tmp_a_int++ = *(int *) b;
+               *tmp_a_int++ = *tmp_b_int;
                *tmp_b_int++ = t_i;
        }
-       for (i = i - sizeof(int) + 1; i <= siz; ++i) {
-               tmp_a_char = (char *) a;
-               tmp_b_char = (char *) b;
+       tmp_a_char = (char *) tmp_a_int;
+       tmp_b_char = (char *) tmp_b_int;
+       for (i = i - sizeof(int) + 1; i <= siz; ++i) {
                t_c = *tmp_a_char;
-
-               *tmp_a_char++ = *(char *) b;
+               *tmp_a_char++ = *tmp_b_char;
                *tmp_b_char++ = t_c;
        }
} -- Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.zend-engine.cvs (#112) next »