From nobody Thu Feb 03 02:49:29 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 58C0519A0BF2; Thu, 3 Feb 2022 02:49:32 +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 4Jq36L324pz4b3X; Thu, 3 Feb 2022 02:49:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643856570; 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=BAam03AB23fVnRfyyvVtIsW4Vpqn+sxNu2njWY59mtI=; b=l2t6I1Gtn0AJhVSSFklyQaHTblXJL8TOoNOW+7zrnek1Dut4mCUiXoztYA4++VVIE67hFe QRLB1o5BWYquFrOpX4Vm/8/mXjljBvT+QM26rT3j8d9M0z7PRcI93pp7y5FKUmvEWq+uji 99nfH4CL4DOcAHOsfAzIfe+at4P3F/saKBLigDrUaLHV3N3Cb0Boc4lel0RucqgCl/ZQN1 O54cTT7A7wfzLQfLDrPamezNQECkwd3WpGy2eroqCAXxETDORfsevzYCXgmaCvze+Pr+Qi kpKFKIi9+miZZ2meNQjjoxc2+xTrpCp+Kzcdcn0Q/PDfvFzdtNSQmZaPnhPktA== 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 1BD597F81; Thu, 3 Feb 2022 02:49:30 +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 2132nUF2087032; Thu, 3 Feb 2022 02:49:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2132nTgk087031; Thu, 3 Feb 2022 02:49:29 GMT (envelope-from git) Date: Thu, 3 Feb 2022 02:49:29 GMT Message-Id: <202202030249.2132nTgk087031@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: a8be0611674e - main - libc/locale/collate.c: minor style 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8be0611674ed33802bbf0f26012fe7855f36fdc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643856570; 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=BAam03AB23fVnRfyyvVtIsW4Vpqn+sxNu2njWY59mtI=; b=npslwkKEcL71niKNHk2R5NQyLaGA9j8502srLFy2yPV2xlJgtr9cd4fG+F6tF7I1tQRm9G 5MPMy7K/pHBu+F/0gc5EDaXotmPnd42aTFZY8a3jxajGbjdUe0AArfR6MZVy2AxehV7O5L Cj+oBVZWIblewJbcsR3apOectet5hAPeTJJTmNXaiZbYzEB00CYMOzXgAPJ5DF6qynDx37 2pwbUcOQ70/Cy+xjO08L+++ntKae4XLKTVFPY4oQivqyWnFbYVuJ3kV4GcKHF9v8RRjzSn bilNNN1FQpp6l/DPWaWkVr9qOEd8YqRBSetW2kABX3W5nQyQrcURkUk6K5zmmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643856570; a=rsa-sha256; cv=none; b=nggY1297ujllVBkCFQW7YE1sT6d6oBNX/Z96VtYsKMBaWjX/oKly8mA8pM728LbIPW7Lr/ 7UM2oO+PV9kPFebq6xah4c0oY0P5Zw0XF9MsJttbMvwgAgJKRr6Ke0dnWsZU3JcW+M13+O p4/k+1viu6BJqDrCjOpMZ2jqzedczKdy+yeNHnA8N4DCAluz+1l82PA6CqpR5qncYNR9yI iUl3ez+NFkddfJRCzWq1datStYjk1NQlN+Vu7KE0Cys0KocnyAGtt7UppUTZvvKKJc0V0a Uga8E8LhglO4M1oAsZxkBHoiPcgBS+KRmhw23yMXCg4odQJ1TAd766MBMtk9wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a8be0611674ed33802bbf0f26012fe7855f36fdc commit a8be0611674ed33802bbf0f26012fe7855f36fdc Author: Konstantin Belousov AuthorDate: 2022-02-02 18:00:53 +0000 Commit: Konstantin Belousov CommitDate: 2022-02-03 01:02:59 +0000 libc/locale/collate.c: minor style Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34140 --- lib/libc/locale/collate.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c index 7afb2043e6a4..4365334322cd 100644 --- a/lib/libc/locale/collate.c +++ b/lib/libc/locale/collate.c @@ -86,17 +86,21 @@ __collate_load(const char *encoding, __unused locale_t unused) { if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0 || strncmp(encoding, "C.", 2) == 0) { - return &__xlocale_C_collate; + return (&__xlocale_C_collate); } - struct xlocale_collate *table = calloc(sizeof(struct xlocale_collate), 1); + struct xlocale_collate *table = calloc(sizeof(struct xlocale_collate), + 1); table->header.header.destructor = destruct_collate; - // FIXME: Make sure that _LDP_CACHE is never returned. We should be doing - // the caching outside of this section + + /* + * FIXME: Make sure that _LDP_CACHE is never returned. We + * should be doing the caching outside of this section. + */ if (__collate_load_tables_l(encoding, table) != _LDP_LOADED) { xlocale_release(table); - return NULL; + return (NULL); } - return table; + return (table); } /**