From nobody Wed Feb 09 00:48:09 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 4DEFE19B7305; Wed, 9 Feb 2022 00:48:12 +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 4Jth7Z4TKMz4tg0; Wed, 9 Feb 2022 00:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644367691; 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=VJFRpemlQhX78gUyWLFDf0ZBClHIkays12QxwuWOYuI=; b=KXNUvixTU8G6FU7aqjXae3V4muqffvdfgiC8lr0mLKjqxlL6Z4g7wiSNjENrdDHpkSwYvf sr4QryeN53cFXTFZsB5D62SCaLLpGZ1iPw9roCmVUli5I/Gh/GbXUSl3+3QwFBIRXCJ+LK qI+3O/UnnGHEz36aSnkH6p6L1xq7lEel7FArTUtd0GQQT6AwvojB4yBsIIxutuXjATZ3kf GN71VPDtC6k/6jV0IYLXzq1zk/swVDdbdyU8+GCILH5n09AAYBO+AvsFYieUhxR1KL7x9r koYQjKhNOVL76AXBxJAUhYa2pKBMV7BctB/ExZqZE1If0X+QSg6JWBbt1zWGnw== 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 1DA1423A82; Wed, 9 Feb 2022 00:48:10 +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 2190m9cY083755; Wed, 9 Feb 2022 00:48:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2190m9EI083754; Wed, 9 Feb 2022 00:48:09 GMT (envelope-from git) Date: Wed, 9 Feb 2022 00:48:09 GMT Message-Id: <202202090048.2190m9EI083754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e6d728c97ccc - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: e6d728c97ccc979560a54cf2d0b6c0aacda8c416 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644367691; 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=VJFRpemlQhX78gUyWLFDf0ZBClHIkays12QxwuWOYuI=; b=ZK0twqnXMNT+7x/5G2exwNMUYPXDZLa1bjbobPcK6/iJ5aIwSqvzm9pl3iMKFuco6EmtST bh3yxyD8Rw83SFX7SuZ6MbaOmRxPtAELgkCm7mjteo7ISZuUU4IBk4q3xTwDnJioImTV8P IAKKJS8zN8RYog9JacUPRh5t416EMjD7dPleDts0VrfZt1TwVKAnsDCeyXGG7bG04fqHee 6m4uZOAKJOPUKcubff0DvJAjXoxxnSHLF/8ffbpH/QZNIpuRHr3j9qtjLGiWfEcqkgv39m YcjrRcJmEr7GTX0mCdRmf2wj39D8ZyWIfgJMA6JwZkAuUfA9Twkk7eYzhBJPCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644367691; a=rsa-sha256; cv=none; b=pRxj3e9L0iBwpVCYZJ1bnPTlyeTRIgKUXnKPJ6wIrtItMfVT194dvzEEiuHfyrh3OI0FEY 3yRNTJkECQtk1uIJLwG237OZlS7DyBVaYygp57gN/z6yOgb4x+UQsmanW3ei/vYrGDO1JP U/olQ8xBMxSeigFecL472Qz+F+QZB2i/4fJyPyn95CN1nfxJB9YyD16GGhFvppShVAobV3 Lt0xwYP2ibhhNebFe31OHftx3Vfxh0AaE2mikSJjKuZZdNL5zBtYbEQcs6ce9o3hBwVWOI N7UsGa12IPfGbvNm4T8HIYKE6Tm9+bV4oGvMAwDwzf1yYDWm6/EWMoP38z653w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e6d728c97ccc979560a54cf2d0b6c0aacda8c416 commit e6d728c97ccc979560a54cf2d0b6c0aacda8c416 Author: Konstantin Belousov AuthorDate: 2022-02-02 18:00:53 +0000 Commit: Konstantin Belousov CommitDate: 2022-02-09 00:42:45 +0000 libc/locale/collate.c: minor style (cherry picked from commit a8be0611674ed33802bbf0f26012fe7855f36fdc) --- 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); } /**