From nobody Mon Sep 26 02:14:08 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 4MbRC463gCz4cYjS; Mon, 26 Sep 2022 02:14:08 +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 4MbRC45TV6z44xc; Mon, 26 Sep 2022 02:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664158448; 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=ARgERb5ta5eiApo0OngepYpjhLSsT5za1L3gcvYaywk=; b=eOJstX8lNxc0iaE3nKgUFVYo9LaoExlWFBUupPnWDt4kzWfFskptkjaDoAcr0r0ha0ihTf 2yiwswk7tq4oh5++TfezEWmmlEzFyiPJlGrPQTOz2LhcJT2z1IbWq+VVCS9dvB0lT1WDFl CVd3QHaxYgyL8yc7T/3nVBRhLZQHpyPv8HoG41Q9BjHIpT77Mx1wcPDqt7BiNs3+XPMs5h 2V/Y/9m1N9oBCBlHD03b1WZEP/4Ap2UcOKcmXbbOmZl31EhJgJNyVKI8Otm1tGPntn9TXW QzChP0/eflTzClEjtWxagLijb5raBTKU1xhQCKk1CbVZfwXamS30Ug41UsL+lQ== 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 4MbRC44TZJzcrD; Mon, 26 Sep 2022 02:14:08 +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 28Q2E8KI051782; Mon, 26 Sep 2022 02:14:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28Q2E8Pw051781; Mon, 26 Sep 2022 02:14:08 GMT (envelope-from git) Date: Mon, 26 Sep 2022 02:14:08 GMT Message-Id: <202209260214.28Q2E8Pw051781@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 45ff071ddcca - main - 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/main X-Git-Reftype: branch X-Git-Commit: 45ff071ddccac0a158cfeb53285e6bb2df6bc835 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664158448; 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=ARgERb5ta5eiApo0OngepYpjhLSsT5za1L3gcvYaywk=; b=cFddX+SJVaXa6KOujEL6ezt35Lr5kjWo7kOlU2eRRUd/ob59uclVCashQBJ5M2JBVFm2XM w9/+G2vWxe7RO3pzBfEGtft9wapPiFIkY5r5lTjmm8O8tA80YXrtMEJxOYd9CKPO7Nn02W c+724tZsXljHnB9FMhSTVW4Jwtd5OWFtVNjDIAWq4cdn/OiB+q1izk8xF5t0RQsaXQHZxp Q7HBNIYynoSyyR48iIJE5Mj33MkvVJftR2a+UGmkqcmEzsUcrnIFz2La2aCsYK5D9SVL1m Lc0nPRnNx40trcWWZH8Rztu3Hx0L5MSFDrzMi56+2JHCfO4pwyebkuiC9VdhYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664158448; a=rsa-sha256; cv=none; b=hs0MkKIjMiiUDiCjuiS5MAye0/Nh1SCvtyA6FpTFG5rhpFKqbUcP9Sna/Ii8uwwufeUCby MpFmPiMSDvX/pEhokRC/SlaanldgDO5PrvNOQid3Xw6H/Auyt8nnFLpR5LORdG9UOV0Olw Xk5CSpKWBTLSHu6kz3cUHCie2+bLuNprCDkNVdTATb1wXqgM09nvlXTDk/ccQU6ioZ4XqP f1nb3OA0Qk6K3u08IR4kvT/XuNZNsSSKQNyKaR10p1LHH+kfT52VhOSjlMzeQIPcw+l45j s9o4SHiEmp72WrhBIpVcps/JpPxHiRJRXYo7YYHIEw+Mp3yl9VrcMtC9wRqvGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=45ff071ddccac0a158cfeb53285e6bb2df6bc835 commit 45ff071ddccac0a158cfeb53285e6bb2df6bc835 Author: Xin LI AuthorDate: 2022-09-26 02:01:46 +0000 Commit: Xin LI CommitDate: 2022-09-26 02:01:46 +0000 scandir(3): Rename alphasort_thunk to scandir_thunk_cmp to reflect that it is not alphasort-specific. Reported by: emaste Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D36708 --- 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 8a260adcd2f3..496b1ddc29db 100644 --- a/lib/libc/gen/scandir.c +++ b/lib/libc/gen/scandir.c @@ -63,7 +63,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 static int @@ -123,7 +123,7 @@ scandir_dirp(DIR *dirp, 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); @@ -199,7 +199,7 @@ versionsort(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 **);