Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdlib The 'table' of character weights is allowed ...



details:   https://anonhg.NetBSD.org/src/rev/9de9f468824b
branches:  trunk
changeset: 746859:9de9f468824b
user:      dsl <dsl%NetBSD.org@localhost>
date:      Fri Aug 21 20:49:50 2009 +0000

description:
The 'table' of character weights is allowed to be NULL.
The SETUP define sorts it out (in the slowest and nastiest possible way!)
Broken by rev 1.12 almost 10 years ago!

diffstat:

 lib/libc/stdlib/radixsort.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r bc18013d42c9 -r 9de9f468824b lib/libc/stdlib/radixsort.c
--- a/lib/libc/stdlib/radixsort.c       Fri Aug 21 18:35:38 2009 +0000
+++ b/lib/libc/stdlib/radixsort.c       Fri Aug 21 20:49:50 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radixsort.c,v 1.17 2009/02/12 03:34:33 lukem Exp $     */
+/*     $NetBSD: radixsort.c,v 1.18 2009/08/21 20:49:50 dsl Exp $       */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)radixsort.c        8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: radixsort.c,v 1.17 2009/02/12 03:34:33 lukem Exp $");
+__RCSID("$NetBSD: radixsort.c,v 1.18 2009/08/21 20:49:50 dsl Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -110,7 +110,6 @@
        u_char tr0[256];
 
        _DIAGASSERT(a != NULL);
-       _DIAGASSERT(tab != NULL);
 
        SETUP;
        r_sort_a(a, n, 0, tr, endch);
@@ -128,8 +127,7 @@
        u_char tr0[256];
 
        _DIAGASSERT(a != NULL);
-       _DIAGASSERT(tab != NULL);
-       if (a == NULL || tab == NULL) {
+       if (a == NULL) {
                errno = EFAULT;
                return (-1);
        }



Home | Main Index | Thread Index | Old Index