git: a8be0611674e - main - libc/locale/collate.c: minor style
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 03 Feb 2022 02:49:29 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=a8be0611674ed33802bbf0f26012fe7855f36fdc
commit a8be0611674ed33802bbf0f26012fe7855f36fdc
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-02-02 18:00:53 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
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);
}
/**