summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpluknet <pluknet@FreeBSD.org>2016-04-18 09:56:41 +0000
committerpluknet <pluknet@FreeBSD.org>2016-04-18 09:56:41 +0000
commit129e98db918f9b9fd962692e6f5be1fa6b3533c3 (patch)
tree289e290e968b956b0d193fd2928e79eb2011c211 /lib
parent81d44bca711d4774c457675c7a52571a4d98f38d (diff)
downloadFreeBSD-src-129e98db918f9b9fd962692e6f5be1fa6b3533c3.zip
FreeBSD-src-129e98db918f9b9fd962692e6f5be1fa6b3533c3.tar.gz
Fixed indentation, minor style.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdlib/qsort.324
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3
index a0610d9..af885ee 100644
--- a/lib/libc/stdlib/qsort.3
+++ b/lib/libc/stdlib/qsort.3
@@ -252,16 +252,16 @@ and then prints the sorted array to standard output is:
#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 *p2)
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
OpenPOWER on IntegriCloud