From 129e98db918f9b9fd962692e6f5be1fa6b3533c3 Mon Sep 17 00:00:00 2001 From: pluknet Date: Mon, 18 Apr 2016 09:56:41 +0000 Subject: [PATCH] Fixed indentation, minor style. --- lib/libc/stdlib/qsort.3 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3 index a0610d9d43f1..af885ee5f762 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 /* - * 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