https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252547

            Bug ID: 252547
           Summary: [PATCH] Fix an example to qsort.3
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Manual Pages
          Assignee: b...@freebsd.org
          Reporter: hod...@nimfsoft.com
                CC: d...@freebsd.org

Created attachment 221431
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=221431&action=edit
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("");

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to