Module Name: src Committed By: dsl Date: Fri Aug 21 20:49:50 UTC 2009
Modified Files: src/lib/libc/stdlib: radixsort.c Log Message: 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! To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/stdlib/radixsort.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/stdlib/radixsort.c diff -u src/lib/libc/stdlib/radixsort.c:1.17 src/lib/libc/stdlib/radixsort.c:1.18 --- src/lib/libc/stdlib/radixsort.c:1.17 Thu Feb 12 03:34:33 2009 +++ src/lib/libc/stdlib/radixsort.c Fri Aug 21 20:49:50 2009 @@ -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); }