Date: Wed, 9 Feb 2022 00:48:09 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: e6d728c97ccc - stable/13 - libc/locale/collate.c: minor style Message-ID: <202202090048.2190m9EI083754@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e6d728c97ccc979560a54cf2d0b6c0aacda8c416 commit e6d728c97ccc979560a54cf2d0b6c0aacda8c416 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-02-02 18:00:53 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> 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); } /**
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202090048.2190m9EI083754>