From nobody Wed Oct 05 06:16:22 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 4Mj48R1DnCz4cwxf; Wed, 5 Oct 2022 06:16:23 +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 4Mj48R0mGmz3ttk; Wed, 5 Oct 2022 06:16:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664950583; 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=s7s25pg5xCinMbYT2FphgBJ6gwwwHOXq7FYnTsGOG1o=; b=f9sNxlIwYrT1UZXc3POGveA91PJ58dUkI8vt90k1bJQ/Hi1eXcGLslvMNu+D85loNV6v/5 x+SXJUo5bAjtuF8hNdMF76dpxZajtVrkzpKZYezBswzbAGw4zJ7Ab8pY9ns3Mzk4FQR/Eu yrPvOw6r9q2qHq3M8t5odJ2QBkAoiM3zFfperz1IM1E8Pb85PfQGkqoliJ8Zi9R7LZbom6 kBQ1r2MKAgW4PTmVwKqF8HRuN/7QbrdfZXwLN3LNDrI99Abnl3UmAajF6D+GbLP2NeElRn MgjwX84z9Z1eR4FsqRqFJ1289kwhwVWh6Qh5OCOliTavcxSVF6997ldCMmrHdQ== 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 4Mj48Q6f9TzpWc; Wed, 5 Oct 2022 06:16:22 +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 2956GMpB082532; Wed, 5 Oct 2022 06:16:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2956GMge082531; Wed, 5 Oct 2022 06:16:22 GMT (envelope-from git) Date: Wed, 5 Oct 2022 06:16:22 GMT Message-Id: <202210050616.2956GMge082531@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: 39be4f7d1f8b - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 39be4f7d1f8b9bebe46c0fc47c4f925632dd49e9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664950583; 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=s7s25pg5xCinMbYT2FphgBJ6gwwwHOXq7FYnTsGOG1o=; b=kMWadKj3NI40lJY9ccL7i1ObP2IHReoNaSZHuwfXKWme3Difs9S2aiOrH1aW9jR7gm6VQE W+KqSCimL3D6FCG3UbyqY3a4Z2v0NqHNA7lTL59bvyacNH4YIuAH47lmS6qCv6XoQECu6H WFGMPBMqYcJ9ysK49tKSCMIexDAFtarGpxttss0g+BSSD++e+eyCdBSeZPDyGF8cLzZIEp dTrwnOoA/7c/9R/bU22WsmAvedRjKeGRcEdxsSDEe7SmA9QFC0Yq27R5amRx09Tzp2bov3 u1UgvWACAfwOs2FTyOEs/2udO2sNMhRoBruh2s+QJxRWQFuvYtzbDSiEGJNJeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664950583; a=rsa-sha256; cv=none; b=GwRFr4CY5aAR8M9LHWDCDQCmfrH9gwFhzWITV4Wq040ZA1IB1ICxtYMctQsrKTz2KCePOs CrXXVnNSEtVqtZepEOHVHgBmq8f5mvKTpaqox31cjshNJ7Spn/QxVGHZYgxKRWOfPswCBi P73gDi7NVxaCXjL9L5td8Q02PGXgICfDAhYbOa73KV+sMudlkjQbDDHDvw/tAxqFHw9ryi g2hIIGbIk9kbfpITQhheR10nlwaZ5lu4+G4VekOIPX0awdaX1JB4u/wwy5zaVlc5sjgaX7 YwNRnZv5LHCvxFs+xMUnzIXqzHpX7FgKkTLEkj2C0EXkJu75R59scgICUTkYkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=39be4f7d1f8b9bebe46c0fc47c4f925632dd49e9 commit 39be4f7d1f8b9bebe46c0fc47c4f925632dd49e9 Author: Xin LI AuthorDate: 2022-09-26 02:01:46 +0000 Commit: Xin LI CommitDate: 2022-10-05 06:16:11 +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 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 **);