Date: Mon, 18 Apr 2016 09:56:41 +0000 (UTC) From: Sergey Kandaurov <pluknet@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298201 - head/lib/libc/stdlib Message-ID: <201604180956.u3I9ufjb004424@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pluknet Date: Mon Apr 18 09:56:41 2016 New Revision: 298201 URL: https://svnweb.freebsd.org/changeset/base/298201 Log: Fixed indentation, minor style. Modified: head/lib/libc/stdlib/qsort.3 Modified: head/lib/libc/stdlib/qsort.3 ============================================================================== --- head/lib/libc/stdlib/qsort.3 Mon Apr 18 09:39:46 2016 (r298200) +++ head/lib/libc/stdlib/qsort.3 Mon Apr 18 09:56:41 2016 (r298201) @@ -252,16 +252,16 @@ and then prints the sorted array to stan #include <stdlib.h> /* - * Custom comparison function that can compare 'int' values through pointers + * Custom comparison function that compares 'int' values through pointers * passed by qsort(3). */ static int int_compare(const void *p1, const void *p2) { - int left = *(const int *)p1; - int right = *(const int *)p2; + int left = *(const int *)p1; + int right = *(const int *)p2; - return ((left > right) - (left < right)); + return ((left > right) - (left < right)); } /* @@ -270,15 +270,15 @@ int_compare(const void *p1, const void * int main(void) { - int int_array[] = { 4, 5, 9, 3, 0, 1, 7, 2, 8, 6 }; - const size_t array_size = sizeof(int_array) / sizeof(int_array[0]); - size_t k; + int int_array[] = { 4, 5, 9, 3, 0, 1, 7, 2, 8, 6 }; + 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); - for (k = 0; k < array_size; k++) - printf(" %d", int_array[k]); - puts(""); - return (EXIT_SUCCESS); + qsort(&int_array, array_size, sizeof(int_array[0]), int_compare); + for (k = 0; k < array_size; k++) + printf(" %d", int_array[k]); + puts(""); + return (EXIT_SUCCESS); } .Ed .Sh COMPATIBILITY
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604180956.u3I9ufjb004424>