Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 Jan 2021 21:27:54 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 252547] [PATCH] Fix an example to qsort.3
Message-ID:  <bug-252547-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252547

            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: bugs@FreeBSD.org
          Reporter: hodong@nimfsoft.com
                CC: doc@FreeBSD.org

Created attachment 221431
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D221431&action=
=3Dedit
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 =3D 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 =3D 0; k < array_size; k++)
                printf(" %d", int_array[k]);
        puts("");

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252547-227>