This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug manual/16838] New: 5.6 Collation Example: sort_strings_fast - qsort arguments out of order
- From: "drankinatty at suddenlinkmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 12 Apr 2014 03:58:09 +0000
- Subject: [Bug manual/16838] New: 5.6 Collation Example: sort_strings_fast - qsort arguments out of order
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16838
Bug ID: 16838
Summary: 5.6 Collation Example: sort_strings_fast - qsort
arguments out of order
Product: glibc
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: manual
Assignee: unassigned at sourceware dot org
Reporter: drankinatty at suddenlinkmail dot com
CC: mtk.manpages at gmail dot com, roland at gnu dot org
Guys,
Here is an easy one for you. In section 5.6 of the libc manual, the example
given for the sort_strings_fast function contains the arguments for qsort in
the wrong order. The example shows:
void
sort_strings_fast (char **array, int nstrings)
{
struct sorter temp_array[nstrings];
int i;
<snip>
/* Sort temp_array by comparing transformed strings. */
qsort (temp_array, sizeof (struct sorter),
nstrings, compare_elements);
should be:
qsort (temp_array, nstrings,
sizeof (struct sorter), compare_elements);
Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.