Summary: | [PATCH] Fix an example to qsort.3 | ||||||
---|---|---|---|---|---|---|---|
Product: | Documentation | Reporter: | Hodong <hodong> | ||||
Component: | Manual Pages | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | doc | ||||
Priority: | --- | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
I was wrong. Sorry. |
Created attachment 221431 [details] patch for qsort.3 example Hello. There seems to be a bug in the example in qsort.3. Please review the following. Thank you. diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3 index 606185f9baee..22a0735af3a0 100644 --- a/lib/libc/stdlib/qsort.3 +++ b/lib/libc/stdlib/qsort.3 @@ -322,7 +322,7 @@ main(void) size_t array_size = sizeof(int_array) / sizeof(int_array[0]); size_t k; - qsort(&int_array, array_size, sizeof(int_array[0]), int_compare); + qsort(int_array, array_size, sizeof(int_array[0]), int_compare); for (k = 0; k < array_size; k++) printf(" %d", int_array[k]); puts("");