From owner-svn-src-all@freebsd.org Mon Apr 18 09:56:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0D60B12497; Mon, 18 Apr 2016 09:56:42 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 815D51435; Mon, 18 Apr 2016 09:56:42 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3I9uffO004425; Mon, 18 Apr 2016 09:56:41 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3I9ufjb004424; Mon, 18 Apr 2016 09:56:41 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201604180956.u3I9ufjb004424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Mon, 18 Apr 2016 09:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298201 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2016 09:56:42 -0000 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 /* - * 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