don't bother storing a temp value
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 15 Dec 1990 03:00:39 +0000 (19:00 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 15 Dec 1990 03:00:39 +0000 (19:00 -0800)
SCCS-vsn: lib/libc/stdlib/radixsort.c 5.5

usr/src/lib/libc/stdlib/radixsort.c

index 1b0de95..ff8aa5a 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)radixsort.c        5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)radixsort.c        5.5 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -133,7 +133,7 @@ radixsort(l1, nmemb, tab, endbyte)
         */
        t1 = ((__rspartition + 1) * (NBUCKETS - 2)) >> 1;
        for (i = 0, t2 = nmemb; t2 > __rspartition; i += NBUCKETS - 1)
         */
        t1 = ((__rspartition + 1) * (NBUCKETS - 2)) >> 1;
        for (i = 0, t2 = nmemb; t2 > __rspartition; i += NBUCKETS - 1)
-               t2 = (++t2 >> 1) - t1;
+               t2 = ((t2 + 1) >> 1) - t1;
        if (i) {
                if (!(stack = stackp = (CONTEXT *)malloc(i * sizeof(CONTEXT))))
                        return(-1);
        if (i) {
                if (!(stack = stackp = (CONTEXT *)malloc(i * sizeof(CONTEXT))))
                        return(-1);