From nobody Wed Oct 05 06:16:49 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mj48x6XwPz4cwv3; Wed, 5 Oct 2022 06:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mj48x66MWz3vN9; Wed, 5 Oct 2022 06:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664950609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5YxSiZlpAl5FZzwuw0LeG9riJaSt4BVq9wWrxAPPzXE=; b=bgslzvMlNqx5nDR3SWnMwC64YyqlWZyWJkxMNB5BnrV4SIpzRiBYags2yswCWRsftVAy7b 5X87dTZQEneUFblXa4KT3JaXi66JixjvatOJrmCU/Nlt0/IJBjjbxgjFISDmvS28w0jw7s 60zWIip9c1qYsBdOpWYeB8NcTpJbpnk7fpnviLNHXPT03teWSeukLQxEbHa6SMLsN394kL M29tHvJ6ZiKfQCtZGdlPlsMRucx1PHyP62BkPL06a+Seuq5lprZ+2HAJ07owT3rcdhzDwc Hhvwz3wtAEhGcWy4040IrHo1OKx3D1bPUULMxhwr8uG679jWVQNp2s6QgahZ5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mj48x5BLrzpWd; Wed, 5 Oct 2022 06:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2956Gndj082686; Wed, 5 Oct 2022 06:16:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2956Gncv082685; Wed, 5 Oct 2022 06:16:49 GMT (envelope-from git) Date: Wed, 5 Oct 2022 06:16:49 GMT Message-Id: <202210050616.2956Gncv082685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: 8ee42190e198 - stable/12 - scandir(3): Rename alphasort_thunk to scandir_thunk_cmp to reflect that it is not alphasort-specific. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8ee42190e198441048f928439cf391338ec4c2cb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664950609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5YxSiZlpAl5FZzwuw0LeG9riJaSt4BVq9wWrxAPPzXE=; b=wb55koHzSNHu+G5sdmn0uydsVPwAhRQIkRI6aJYrdTx0juyr3/++R1OTVAMdX2jOkkg7m4 ouq12mSKE8IN1PuNo3iJGBMDP7BXtPBlwYPXCkmh0P47F9mB+zys4ZsdUOQ42SjKeaivlT lvj3pH1BOsU3RYuXEFXwCnTMTj9VHTs3agUlFA237tXm4+2o2P9TkIcMS93fLvZZm5QyRX dcVxOqX9ZCf5WIyTwF1BURBupp7TcH0iG8kO6O3bn5l5f/7+s3ledl5E617o+PVFSyntEx jmvKr5YFYnJ2u+xLMnXaobgoWE2+68Kg+HPlG7rlK7R0KGFSg60kNjJtZ2xBLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664950609; a=rsa-sha256; cv=none; b=hJSFNUlHGG9S8n+EzbLPndJoLOwCD4pN6WkxbnLHGupyUZCo4F0Cxmv0Xy8JkVGAPjyEIl 6ejuk+PPmKJgzra/n/7N6HxkfWBmm9yxZBGDRPSqXntWn8gkzw3TJuc7i6lZbNDOXhEwrr 2+R6lKfYfSOvs3jpRPOMAemSSR/RuujN2BkWGDhC/vQm/bMMw4m3SKTt4J5TJkGxNOftwG bAc/KXMopg886PaeklNfqteb2bhuthEVO+JP5hFAI0geF8ShBL/0J9jSEBAuQ6QOvkSs7A 65uvaTnMIw3dOXYU05Etkd2Ts+fvwubPAjY+fLs6G3jApveyn7zDjBGJfcu4LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=8ee42190e198441048f928439cf391338ec4c2cb commit 8ee42190e198441048f928439cf391338ec4c2cb Author: Xin LI AuthorDate: 2022-09-26 02:01:46 +0000 Commit: Xin LI CommitDate: 2022-10-05 06:16:40 +0000 scandir(3): Rename alphasort_thunk to scandir_thunk_cmp to reflect that it is not alphasort-specific. Reported by: emaste Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D36708 (cherry picked from commit 45ff071ddccac0a158cfeb53285e6bb2df6bc835) --- lib/libc/gen/scandir-compat11.c | 6 +++--- lib/libc/gen/scandir.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libc/gen/scandir-compat11.c b/lib/libc/gen/scandir-compat11.c index 2c86b548f1d9..e6af1929a4d2 100644 --- a/lib/libc/gen/scandir-compat11.c +++ b/lib/libc/gen/scandir-compat11.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #define SELECT(x) select(x) -static int freebsd11_alphasort_thunk(void *thunk, const void *p1, +static int freebsd11_scandir_thunk_cmp(void *thunk, const void *p1, const void *p2); int @@ -116,7 +116,7 @@ freebsd11_scandir(const char *dirname, struct freebsd11_dirent ***namelist, closedir(dirp); if (numitems && dcomp != NULL) qsort_r(names, numitems, sizeof(struct freebsd11_dirent *), - &dcomp, freebsd11_alphasort_thunk); + &dcomp, freebsd11_scandir_thunk_cmp); *namelist = names; return (numitems); @@ -141,7 +141,7 @@ freebsd11_alphasort(const struct freebsd11_dirent **d1, } static int -freebsd11_alphasort_thunk(void *thunk, const void *p1, const void *p2) +freebsd11_scandir_thunk_cmp(void *thunk, const void *p1, const void *p2) { int (*dc)(const struct freebsd11_dirent **, const struct freebsd11_dirent **); diff --git a/lib/libc/gen/scandir.c b/lib/libc/gen/scandir.c index 10cd7633dac1..aac5e7970777 100644 --- a/lib/libc/gen/scandir.c +++ b/lib/libc/gen/scandir.c @@ -61,7 +61,7 @@ typedef DECLARE_BLOCK(int, select_block, const struct dirent *); typedef DECLARE_BLOCK(int, dcomp_block, const struct dirent **, const struct dirent **); #else -static int alphasort_thunk(void *thunk, const void *p1, const void *p2); +static int scandir_thunk_cmp(void *thunk, const void *p1, const void *p2); #endif int @@ -125,7 +125,7 @@ scandir(const char *dirname, struct dirent ***namelist, qsort_b(names, numitems, sizeof(struct dirent *), (void*)dcomp); #else qsort_r(names, numitems, sizeof(struct dirent *), - &dcomp, alphasort_thunk); + &dcomp, scandir_thunk_cmp); #endif *namelist = names; return (numitems); @@ -151,7 +151,7 @@ alphasort(const struct dirent **d1, const struct dirent **d2) } static int -alphasort_thunk(void *thunk, const void *p1, const void *p2) +scandir_thunk_cmp(void *thunk, const void *p1, const void *p2) { int (*dc)(const struct dirent **, const struct dirent **);