aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/locale
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2022-02-02 18:00:53 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2022-02-09 00:42:45 +0000
commite6d728c97ccc979560a54cf2d0b6c0aacda8c416 (patch)
tree17e3df6f3ec565ecb64ead995f86f0aef5be9368 /lib/libc/locale
parente1c53fc8e15491d03641736e07c743fcb4324b2f (diff)
libc/locale/collate.c: minor style
(cherry picked from commit a8be0611674ed33802bbf0f26012fe7855f36fdc)
Diffstat (limited to 'lib/libc/locale')
-rw-r--r--lib/libc/locale/collate.c16
1 files 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);
}
/**